Project name

This commit is contained in:
Bob Mottram 2018-05-02 11:22:36 +01:00
parent ac43e249f4
commit c6fd0d43c8
14 changed files with 30 additions and 30 deletions

View File

@ -65,11 +65,11 @@ function postactiv_customise_logo {
domain_name=$1
if [ -f "/var/www/${domain_name}/htdocs/static/logo.png" ]; then
if [ -f ~/freedombone/img/postactiv.png ]; then
cp ~/freedombone/img/postactiv.png "/var/www/${domain_name}/htdocs/static/logo.png"
if [ -f "$HOME/${PROJECT_NAME}/img/postactiv.png" ]; then
cp "$HOME/${PROJECT_NAME}/img/postactiv.png" "/var/www/${domain_name}/htdocs/static/logo.png"
else
if [ -f "/home/$MY_USERNAME/freedombone/img/postactiv.png" ]; then
cp "/home/$MY_USERNAME/freedombone/img/postactiv.png" "/var/www/${domain_name}/htdocs/static/logo.png"
if [ -f "/home/$MY_USERNAME/${PROJECT_NAME}/img/postactiv.png" ]; then
cp "/home/$MY_USERNAME/${PROJECT_NAME}/img/postactiv.png" "/var/www/${domain_name}/htdocs/static/logo.png"
fi
fi
fi

View File

@ -56,12 +56,12 @@ function logging_off_searx {
}
function searx_set_default_background {
if [ -f ~/freedombone/img/backgrounds/searx.jpg ]; then
cp ~/freedombone/img/backgrounds/searx.jpg /etc/searx/searx/static/themes/courgette/img/bg-body-index.jpg
if [ -f "$HOME/${PROJECT_NAME}/img/backgrounds/searx.jpg" ]; then
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
else
if [ -f "/home/$MY_USERNAME/freedombone/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"
if [ -f "/home/$MY_USERNAME/${PROJECT_NAME}/img/backgrounds/searx.jpg" ]; then
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
fi
fi

View File

@ -377,11 +377,11 @@ function update_prosody_modules {
if [ ! -f "$INSTALL_DIR/$prosody_modules_filename" ]; then
# Obtain the modules
if [ -f ~/freedombone/image_build/$prosody_modules_filename ]; then
cp ~/freedombone/image_build/$prosody_modules_filename "$INSTALL_DIR"
if [ -f "$HOME/${PROJECT_NAME}/image_build/$prosody_modules_filename" ]; then
cp "$HOME/${PROJECT_NAME}/image_build/$prosody_modules_filename" "$INSTALL_DIR"
else
if [ -f "/home/$MY_USERNAME/freedombone/image_build/$prosody_modules_filename" ]; then
cp "/home/$MY_USERNAME/freedombone/image_build/$prosody_modules_filename" "$INSTALL_DIR"
if [ -f "/home/$MY_USERNAME/${PROJECT_NAME}/image_build/$prosody_modules_filename" ]; then
cp "/home/$MY_USERNAME/${PROJECT_NAME}/image_build/$prosody_modules_filename" "$INSTALL_DIR"
fi
fi

View File

@ -138,7 +138,7 @@ function show_help {
echo ''
echo ''
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 $' -w --www Freedombone web site'
echo $' -o --onion [yes|no] Whether to only create .onion sites'

View File

@ -244,7 +244,7 @@ function image_setup {
cd "$USERHOME/develop/multipath-tools" || exit 27462454
makepkg --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}"
if [ ! -f "/usr/share/debootstrap/scripts/${DEBIAN_VERSION}" ]; then
echo $"No debian debootstrap script was found for $DEBIAN_VERSION"

View File

@ -437,7 +437,7 @@ EOF
echo " echo 'User=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 '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 '[Install]' >> /etc/systemd/system/wifistart.service";
echo " echo 'WantedBy=multi-user.target' >> /etc/systemd/system/wifistart.service";
@ -483,7 +483,7 @@ continue_installation() {
}
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
}
@ -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[ru]= ' >> /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 'Terminal=false' >> /home/$MY_USERNAME/Desktop/invite.desktop
echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/invite.desktop

View File

@ -30,7 +30,7 @@ export TEXTDOMAIN=${PROJECT_NAME}-image-vmdebootstrap
export TEXTDOMAINDIR="/usr/share/locale"
VMDEBOOTSTRAP_REPO="https://github.com/bashrc/vmdebootstrap"
VMDEBOOTSTRAP_BRANCH='bashrc/freedombone'
VMDEBOOTSTRAP_BRANCH="bashrc/${PROJECT_NAME}"
mkdir -p vendor
if [ -d vendor/vmdebootstrap ] ; then

View File

@ -88,7 +88,7 @@ function regenerate_blog {
}
function view_blog {
freedombone-mesh-visit-site '/Blog'
${PROJECT_NAME}-mesh-visit-site '/Blog'
exit 0
}

View File

@ -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 /tmp/includescripts /usr/local/bin/freedombone-controlpanel > /usr/local/bin/control
cat /tmp/includescripts /usr/local/bin/freedombone-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}-controlpanel > /usr/local/bin/control
cat /tmp/includescripts /usr/local/bin/${PROJECT_NAME}-controlpanel-user > /usr/local/bin/controluser
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/controluser

View File

@ -64,7 +64,7 @@ fi
if [ -f /usr/bin/backupdatabases ]; then
if grep -q "cat /root/dbpass" /usr/bin/backupdatabases; then
# 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

View File

@ -119,9 +119,9 @@ function create_freedns_updater {
fi
# 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
cron_add_mins 3 '/usr/local/bin/freedombone-freedns'
cron_add_mins 3 "/usr/local/bin/${PROJECT_NAME}-freedns"
systemctl restart cron
fi

View File

@ -484,7 +484,7 @@ function gnusocial_block_user_script {
echo "database_name=\$1";
echo "remove_user=\$2";
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 "if [ \${#remove_user} -lt 2 ]; then";
echo ' echo $"No user was specified"';

View File

@ -182,8 +182,8 @@ function mesh_create_app_downloads_page {
if [ ! -f /var/www/html/images/trifa.png ]; then
cp "/root/$PROJECT_NAME/img/trifa.png" /var/www/html/images/trifa.png
fi
if [ ! -f /var/www/html/freedombone.css ]; then
cp "/root/$PROJECT_NAME/website/freedombone.css" /var/www/html/freedombone.css
if [ ! -f "/var/www/html/${PROJECT_NAME}.css" ]; then
cp "/root/$PROJECT_NAME/website/${PROJECT_NAME}.css" "/var/www/html/${PROJECT_NAME}.css"
fi
chown -R www-data:www-data /var/www/html/*
}

View File

@ -88,10 +88,10 @@ function setup_wifi_atheros {
atheros_drivers_file=drivers/firmware-ath9k-htc.deb
if [ ! -f $atheros_drivers_file ]; then
if [ ! -f ~/freedombone/$atheros_drivers_file ]; then
if [ ! -f "$HOME/${PROJECT_NAME}/$atheros_drivers_file" ]; then
return
else
atheros_drivers_file=~/freedombone/$atheros_drivers_file
atheros_drivers_file="$HOME/${PROJECT_NAME}/$atheros_drivers_file"
fi
else
atheros_drivers_file=$(pwd)/$atheros_drivers_file