Project name
This commit is contained in:
parent
ac43e249f4
commit
c6fd0d43c8
|
@ -65,11 +65,11 @@ function postactiv_customise_logo {
|
||||||
domain_name=$1
|
domain_name=$1
|
||||||
|
|
||||||
if [ -f "/var/www/${domain_name}/htdocs/static/logo.png" ]; then
|
if [ -f "/var/www/${domain_name}/htdocs/static/logo.png" ]; then
|
||||||
if [ -f ~/freedombone/img/postactiv.png ]; then
|
if [ -f "$HOME/${PROJECT_NAME}/img/postactiv.png" ]; then
|
||||||
cp ~/freedombone/img/postactiv.png "/var/www/${domain_name}/htdocs/static/logo.png"
|
cp "$HOME/${PROJECT_NAME}/img/postactiv.png" "/var/www/${domain_name}/htdocs/static/logo.png"
|
||||||
else
|
else
|
||||||
if [ -f "/home/$MY_USERNAME/freedombone/img/postactiv.png" ]; then
|
if [ -f "/home/$MY_USERNAME/${PROJECT_NAME}/img/postactiv.png" ]; then
|
||||||
cp "/home/$MY_USERNAME/freedombone/img/postactiv.png" "/var/www/${domain_name}/htdocs/static/logo.png"
|
cp "/home/$MY_USERNAME/${PROJECT_NAME}/img/postactiv.png" "/var/www/${domain_name}/htdocs/static/logo.png"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -56,12 +56,12 @@ function logging_off_searx {
|
||||||
}
|
}
|
||||||
|
|
||||||
function searx_set_default_background {
|
function searx_set_default_background {
|
||||||
if [ -f ~/freedombone/img/backgrounds/searx.jpg ]; then
|
if [ -f "$HOME/${PROJECT_NAME}/img/backgrounds/searx.jpg" ]; then
|
||||||
cp ~/freedombone/img/backgrounds/searx.jpg /etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg
|
cp "$HOME/${PROJECT_NAME}/img/backgrounds/searx.jpg" /etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg
|
||||||
chown -R searx:searx ${SEARX_PATH}/searx
|
chown -R searx:searx ${SEARX_PATH}/searx
|
||||||
else
|
else
|
||||||
if [ -f "/home/$MY_USERNAME/freedombone/img/backgrounds/searx.jpg" ]; then
|
if [ -f "/home/$MY_USERNAME/${PROJECT_NAME}/img/backgrounds/searx.jpg" ]; then
|
||||||
cp "/home/$MY_USERNAME/freedombone/img/backgrounds/searx.jpg" "/etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg"
|
cp "/home/$MY_USERNAME/${PROJECT_NAME}/img/backgrounds/searx.jpg" "/etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg"
|
||||||
chown -R searx:searx ${SEARX_PATH}/searx
|
chown -R searx:searx ${SEARX_PATH}/searx
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -377,11 +377,11 @@ function update_prosody_modules {
|
||||||
|
|
||||||
if [ ! -f "$INSTALL_DIR/$prosody_modules_filename" ]; then
|
if [ ! -f "$INSTALL_DIR/$prosody_modules_filename" ]; then
|
||||||
# Obtain the modules
|
# Obtain the modules
|
||||||
if [ -f ~/freedombone/image_build/$prosody_modules_filename ]; then
|
if [ -f "$HOME/${PROJECT_NAME}/image_build/$prosody_modules_filename" ]; then
|
||||||
cp ~/freedombone/image_build/$prosody_modules_filename "$INSTALL_DIR"
|
cp "$HOME/${PROJECT_NAME}/image_build/$prosody_modules_filename" "$INSTALL_DIR"
|
||||||
else
|
else
|
||||||
if [ -f "/home/$MY_USERNAME/freedombone/image_build/$prosody_modules_filename" ]; then
|
if [ -f "/home/$MY_USERNAME/${PROJECT_NAME}/image_build/$prosody_modules_filename" ]; then
|
||||||
cp "/home/$MY_USERNAME/freedombone/image_build/$prosody_modules_filename" "$INSTALL_DIR"
|
cp "/home/$MY_USERNAME/${PROJECT_NAME}/image_build/$prosody_modules_filename" "$INSTALL_DIR"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ function show_help {
|
||||||
echo ''
|
echo ''
|
||||||
echo ''
|
echo ''
|
||||||
echo $' -h --help Show help'
|
echo $' -h --help Show help'
|
||||||
echo $' -f --filename Configuration file (usually freedombone.cfg)'
|
echo $" -f --filename Configuration file (usually ${PROJECT_NAME}.cfg)"
|
||||||
echo $' -m --min Minimum password length (characters)'
|
echo $' -m --min Minimum password length (characters)'
|
||||||
echo $' -w --www Freedombone web site'
|
echo $' -w --www Freedombone web site'
|
||||||
echo $' -o --onion [yes|no] Whether to only create .onion sites'
|
echo $' -o --onion [yes|no] Whether to only create .onion sites'
|
||||||
|
|
|
@ -244,7 +244,7 @@ function image_setup {
|
||||||
cd "$USERHOME/develop/multipath-tools" || exit 27462454
|
cd "$USERHOME/develop/multipath-tools" || exit 27462454
|
||||||
makepkg --force --noconfirm
|
makepkg --force --noconfirm
|
||||||
makepkg -i --force --noconfirm
|
makepkg -i --force --noconfirm
|
||||||
sudo wget "https://raw.githubusercontent.com/bashrc/freedombone/master/image_build/debootstrap/scripts/${DEBIAN_VERSION}" -O /usr/share/debootstrap/scripts/debscript
|
sudo wget "https://raw.githubusercontent.com/bashrc/${PROJECT_NAME}/master/image_build/debootstrap/scripts/${DEBIAN_VERSION}" -O /usr/share/debootstrap/scripts/debscript
|
||||||
sudo cp -f "/usr/share/debootstrap/scripts/debscript" "/usr/share/debootstrap/scripts/${DEBIAN_VERSION}"
|
sudo cp -f "/usr/share/debootstrap/scripts/debscript" "/usr/share/debootstrap/scripts/${DEBIAN_VERSION}"
|
||||||
if [ ! -f "/usr/share/debootstrap/scripts/${DEBIAN_VERSION}" ]; then
|
if [ ! -f "/usr/share/debootstrap/scripts/${DEBIAN_VERSION}" ]; then
|
||||||
echo $"No debian debootstrap script was found for $DEBIAN_VERSION"
|
echo $"No debian debootstrap script was found for $DEBIAN_VERSION"
|
||||||
|
|
|
@ -437,7 +437,7 @@ EOF
|
||||||
echo " echo 'User=root' >> /etc/systemd/system/wifistart.service";
|
echo " echo 'User=root' >> /etc/systemd/system/wifistart.service";
|
||||||
echo " echo 'Group=root' >> /etc/systemd/system/wifistart.service";
|
echo " echo 'Group=root' >> /etc/systemd/system/wifistart.service";
|
||||||
echo " echo 'WorkingDirectory=/root' >> /etc/systemd/system/wifistart.service";
|
echo " echo 'WorkingDirectory=/root' >> /etc/systemd/system/wifistart.service";
|
||||||
echo " echo 'ExecStart=/usr/local/bin/freedombone-wifi --wait 5 2> /dev/null' >> /etc/systemd/system/wifistart.service";
|
echo " echo 'ExecStart=/usr/local/bin/${PROJECT_NAME}-wifi --wait 5 2> /dev/null' >> /etc/systemd/system/wifistart.service";
|
||||||
echo " echo '' >> /etc/systemd/system/wifistart.service";
|
echo " echo '' >> /etc/systemd/system/wifistart.service";
|
||||||
echo " echo '[Install]' >> /etc/systemd/system/wifistart.service";
|
echo " echo '[Install]' >> /etc/systemd/system/wifistart.service";
|
||||||
echo " echo 'WantedBy=multi-user.target' >> /etc/systemd/system/wifistart.service";
|
echo " echo 'WantedBy=multi-user.target' >> /etc/systemd/system/wifistart.service";
|
||||||
|
@ -483,7 +483,7 @@ continue_installation() {
|
||||||
}
|
}
|
||||||
|
|
||||||
atheros_wifi() {
|
atheros_wifi() {
|
||||||
chroot "$rootdir" dpkg -i /root/freedombone/drivers/firmware-ath9k-htc.deb
|
chroot "$rootdir" dpkg -i /root/${PROJECT_NAME}/drivers/firmware-ath9k-htc.deb
|
||||||
chroot "$rootdir" apt-get -yq install firmware-linux-free
|
chroot "$rootdir" apt-get -yq install firmware-linux-free
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1526,7 +1526,7 @@ if [ \$no_of_users -gt 0 ]; then
|
||||||
echo 'Comment[it]=Crea un invito per patchwork' >> /home/$MY_USERNAME/Desktop/invite.desktop
|
echo 'Comment[it]=Crea un invito per patchwork' >> /home/$MY_USERNAME/Desktop/invite.desktop
|
||||||
echo 'Comment[ru]= ' >> /home/$MY_USERNAME/Desktop/invite.desktop
|
echo 'Comment[ru]= ' >> /home/$MY_USERNAME/Desktop/invite.desktop
|
||||||
echo 'Comment[zh]=' >> /home/$MY_USERNAME/Desktop/invite.desktop
|
echo 'Comment[zh]=' >> /home/$MY_USERNAME/Desktop/invite.desktop
|
||||||
echo 'Exec=mate-terminal -e freedombone-mesh-invite' >> /home/$MY_USERNAME/Desktop/invite.desktop
|
echo 'Exec=mate-terminal -e ${PROJECT_NAME}-mesh-invite' >> /home/$MY_USERNAME/Desktop/invite.desktop
|
||||||
echo 'Icon=/usr/share/$PROJECT_NAME/avatars/icon_invite.png' >> /home/$MY_USERNAME/Desktop/invite.desktop
|
echo 'Icon=/usr/share/$PROJECT_NAME/avatars/icon_invite.png' >> /home/$MY_USERNAME/Desktop/invite.desktop
|
||||||
echo 'Terminal=false' >> /home/$MY_USERNAME/Desktop/invite.desktop
|
echo 'Terminal=false' >> /home/$MY_USERNAME/Desktop/invite.desktop
|
||||||
echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/invite.desktop
|
echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/invite.desktop
|
||||||
|
|
|
@ -30,7 +30,7 @@ export TEXTDOMAIN=${PROJECT_NAME}-image-vmdebootstrap
|
||||||
export TEXTDOMAINDIR="/usr/share/locale"
|
export TEXTDOMAINDIR="/usr/share/locale"
|
||||||
|
|
||||||
VMDEBOOTSTRAP_REPO="https://github.com/bashrc/vmdebootstrap"
|
VMDEBOOTSTRAP_REPO="https://github.com/bashrc/vmdebootstrap"
|
||||||
VMDEBOOTSTRAP_BRANCH='bashrc/freedombone'
|
VMDEBOOTSTRAP_BRANCH="bashrc/${PROJECT_NAME}"
|
||||||
|
|
||||||
mkdir -p vendor
|
mkdir -p vendor
|
||||||
if [ -d vendor/vmdebootstrap ] ; then
|
if [ -d vendor/vmdebootstrap ] ; then
|
||||||
|
|
|
@ -88,7 +88,7 @@ function regenerate_blog {
|
||||||
}
|
}
|
||||||
|
|
||||||
function view_blog {
|
function view_blog {
|
||||||
freedombone-mesh-visit-site '/Blog'
|
${PROJECT_NAME}-mesh-visit-site '/Blog'
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,9 @@ PROJECT_NAME='freedombone'
|
||||||
|
|
||||||
cat /usr/local/bin/${PROJECT_NAME}-vars /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-* /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-* > /tmp/includescripts
|
cat /usr/local/bin/${PROJECT_NAME}-vars /usr/share/${PROJECT_NAME}/utils/${PROJECT_NAME}-utils-* /usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-* > /tmp/includescripts
|
||||||
|
|
||||||
cat /tmp/includescripts /usr/local/bin/freedombone-controlpanel > /usr/local/bin/control
|
cat /tmp/includescripts /usr/local/bin/${PROJECT_NAME}-controlpanel > /usr/local/bin/control
|
||||||
cat /tmp/includescripts /usr/local/bin/freedombone-controlpanel-user > /usr/local/bin/controluser
|
cat /tmp/includescripts /usr/local/bin/${PROJECT_NAME}-controlpanel-user > /usr/local/bin/controluser
|
||||||
cat /tmp/includescripts /usr/local/bin/freedombone-addremove > /usr/local/bin/addremove
|
cat /tmp/includescripts /usr/local/bin/${PROJECT_NAME}-addremove > /usr/local/bin/addremove
|
||||||
|
|
||||||
sed -i '/# Start including files/,/# End including files/d' /usr/local/bin/control
|
sed -i '/# Start including files/,/# End including files/d' /usr/local/bin/control
|
||||||
sed -i '/# Start including files/,/# End including files/d' /usr/local/bin/controluser
|
sed -i '/# Start including files/,/# End including files/d' /usr/local/bin/controluser
|
||||||
|
|
|
@ -64,7 +64,7 @@ fi
|
||||||
if [ -f /usr/bin/backupdatabases ]; then
|
if [ -f /usr/bin/backupdatabases ]; then
|
||||||
if grep -q "cat /root/dbpass" /usr/bin/backupdatabases; then
|
if grep -q "cat /root/dbpass" /usr/bin/backupdatabases; then
|
||||||
# update to using the password manager
|
# update to using the password manager
|
||||||
sed -i "s|cat /root/dbpass|freedombone-pass -u root -a mariadb|g" /usr/bin/backupdatabases
|
sed -i "s|cat /root/dbpass|${PROJECT_NAME}-pass -u root -a mariadb|g" /usr/bin/backupdatabases
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -119,9 +119,9 @@ function create_freedns_updater {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# add the update command to cron
|
# add the update command to cron
|
||||||
if ! grep -q "/usr/local/bin/freedombone-freedns" /etc/crontab; then
|
if ! grep -q "/usr/local/bin/${PROJECT_NAME}-freedns" /etc/crontab; then
|
||||||
function_check cron_add_mins
|
function_check cron_add_mins
|
||||||
cron_add_mins 3 '/usr/local/bin/freedombone-freedns'
|
cron_add_mins 3 "/usr/local/bin/${PROJECT_NAME}-freedns"
|
||||||
systemctl restart cron
|
systemctl restart cron
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -484,7 +484,7 @@ function gnusocial_block_user_script {
|
||||||
echo "database_name=\$1";
|
echo "database_name=\$1";
|
||||||
echo "remove_user=\$2";
|
echo "remove_user=\$2";
|
||||||
echo "domain_name=\$3";
|
echo "domain_name=\$3";
|
||||||
echo "MARIADB_PASSWORD=\$(freedombone-pass -u root -a mariadb)";
|
echo "MARIADB_PASSWORD=\$(${PROJECT_NAME}-pass -u root -a mariadb)";
|
||||||
echo '';
|
echo '';
|
||||||
echo "if [ \${#remove_user} -lt 2 ]; then";
|
echo "if [ \${#remove_user} -lt 2 ]; then";
|
||||||
echo ' echo $"No user was specified"';
|
echo ' echo $"No user was specified"';
|
||||||
|
|
|
@ -182,8 +182,8 @@ function mesh_create_app_downloads_page {
|
||||||
if [ ! -f /var/www/html/images/trifa.png ]; then
|
if [ ! -f /var/www/html/images/trifa.png ]; then
|
||||||
cp "/root/$PROJECT_NAME/img/trifa.png" /var/www/html/images/trifa.png
|
cp "/root/$PROJECT_NAME/img/trifa.png" /var/www/html/images/trifa.png
|
||||||
fi
|
fi
|
||||||
if [ ! -f /var/www/html/freedombone.css ]; then
|
if [ ! -f "/var/www/html/${PROJECT_NAME}.css" ]; then
|
||||||
cp "/root/$PROJECT_NAME/website/freedombone.css" /var/www/html/freedombone.css
|
cp "/root/$PROJECT_NAME/website/${PROJECT_NAME}.css" "/var/www/html/${PROJECT_NAME}.css"
|
||||||
fi
|
fi
|
||||||
chown -R www-data:www-data /var/www/html/*
|
chown -R www-data:www-data /var/www/html/*
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,10 +88,10 @@ function setup_wifi_atheros {
|
||||||
|
|
||||||
atheros_drivers_file=drivers/firmware-ath9k-htc.deb
|
atheros_drivers_file=drivers/firmware-ath9k-htc.deb
|
||||||
if [ ! -f $atheros_drivers_file ]; then
|
if [ ! -f $atheros_drivers_file ]; then
|
||||||
if [ ! -f ~/freedombone/$atheros_drivers_file ]; then
|
if [ ! -f "$HOME/${PROJECT_NAME}/$atheros_drivers_file" ]; then
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
atheros_drivers_file=~/freedombone/$atheros_drivers_file
|
atheros_drivers_file="$HOME/${PROJECT_NAME}/$atheros_drivers_file"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
atheros_drivers_file=$(pwd)/$atheros_drivers_file
|
atheros_drivers_file=$(pwd)/$atheros_drivers_file
|
||||||
|
|
Loading…
Reference in New Issue