Project name

This commit is contained in:
Bob Mottram 2015-12-29 16:42:35 +00:00
parent 6aa2cdafe7
commit cf57fd9cdd
1 changed files with 23 additions and 23 deletions

View File

@ -210,7 +210,7 @@ OWNCLOUD_MUSIC_APP_COMMIT='7f79afb4ae9a6ecd8f530d87106f960306c0a15a'
# Domain name for your wiki # Domain name for your wiki
WIKI_DOMAIN_NAME= WIKI_DOMAIN_NAME=
WIKI_ADMIN_PASSWORD= WIKI_ADMIN_PASSWORD=
WIKI_TITLE="Freedombone Wiki" WIKI_TITLE="${PROJECT_NAME} Wiki"
WIKI_CODE= WIKI_CODE=
# Domain name for your blog # Domain name for your blog
@ -220,7 +220,7 @@ FULLBLOG_ONION_PORT=8086
FULLBLOG_REPO="https://github.com/danpros/htmly" FULLBLOG_REPO="https://github.com/danpros/htmly"
FULLBLOG_COMMIT='5f271a2370cc1bfde15f2a0d5ed6928cc74b0efa' FULLBLOG_COMMIT='5f271a2370cc1bfde15f2a0d5ed6928cc74b0efa'
MY_BLOG_TITLE="My Blog" MY_BLOG_TITLE="My Blog"
MY_BLOG_SUBTITLE="Another Freedombone Blog" MY_BLOG_SUBTITLE="Another ${PROJECT_NAME} Blog"
GPG_KEYSERVER="hkp://keys.gnupg.net" GPG_KEYSERVER="hkp://keys.gnupg.net"
@ -468,7 +468,7 @@ LETSENCRYPT_SERVER='https://acme-v01.api.letsencrypt.org/directory'
function show_help { function show_help {
echo '' echo ''
echo $'freedombone -c [configuration file]' echo $"${PROJECT_NAME} -c [configuration file]"
echo '' echo ''
echo $' -h --help Show help' echo $' -h --help Show help'
echo $' menuconfig Easy interactive installation' echo $' menuconfig Easy interactive installation'
@ -614,7 +614,7 @@ function interactive_configuration {
FRIENDS_SERVERS_LIST=/home/$MY_USERNAME/backup.list FRIENDS_SERVERS_LIST=/home/$MY_USERNAME/backup.list
dialog --title $"Encrypted backup to other servers" \ dialog --title $"Encrypted backup to other servers" \
--backtitle $"Freedombone Configuration" \ --backtitle $"${PROJECT_NAME} Configuration" \
--defaultno \ --defaultno \
--yesno $"\nDo you wish to configure some remote backup locations?" 7 60 --yesno $"\nDo you wish to configure some remote backup locations?" 7 60
sel=$? sel=$?
@ -848,7 +848,7 @@ function parse_args {
SYSTEM_TYPE=$VARIANT_FULL SYSTEM_TYPE=$VARIANT_FULL
fi fi
if [[ $SYSTEM_TYPE != $VARIANT_WRITER && $SYSTEM_TYPE != $VARIANT_CLOUD && $SYSTEM_TYPE != $VARIANT_CHAT && $SYSTEM_TYPE != $VARIANT_MAILBOX && $SYSTEM_TYPE != $VARIANT_NONMAILBOX && $SYSTEM_TYPE != $VARIANT_SOCIAL && $SYSTEM_TYPE != $VARIANT_MEDIA && $SYSTEM_TYPE != $VARIANT_DEVELOPER && $SYSTEM_TYPE != $VARIANT_MESH && $SYSTEM_TYPE != $VARIANT_FULL ]]; then if [[ $SYSTEM_TYPE != $VARIANT_WRITER && $SYSTEM_TYPE != $VARIANT_CLOUD && $SYSTEM_TYPE != $VARIANT_CHAT && $SYSTEM_TYPE != $VARIANT_MAILBOX && $SYSTEM_TYPE != $VARIANT_NONMAILBOX && $SYSTEM_TYPE != $VARIANT_SOCIAL && $SYSTEM_TYPE != $VARIANT_MEDIA && $SYSTEM_TYPE != $VARIANT_DEVELOPER && $SYSTEM_TYPE != $VARIANT_MESH && $SYSTEM_TYPE != $VARIANT_FULL ]]; then
echo $"'$SYSTEM_TYPE' is an unrecognised Freedombone variant." echo $"'$SYSTEM_TYPE' is an unrecognised ${PROJECT_NAME} variant."
exit 30 exit 30
fi fi
} }
@ -870,8 +870,8 @@ function read_configuration {
if [ -f $CONFIGURATION_FILE ]; then if [ -f $CONFIGURATION_FILE ]; then
# Ensure that a copy of the config exists for upgrade purposes # Ensure that a copy of the config exists for upgrade purposes
if [[ $CONFIGURATION_FILE != '/root/freedombone.cfg' ]]; then if [[ $CONFIGURATION_FILE != "/root/${PROJECT_NAME}.cfg" ]]; then
cp $CONFIGURATION_FILE /root/freedombone.cfg cp $CONFIGURATION_FILE /root/${PROJECT_NAME}.cfg
fi fi
if grep -q "IRC_PASSWORD" $CONFIGURATION_FILE; then if grep -q "IRC_PASSWORD" $CONFIGURATION_FILE; then
IRC_PASSWORD=$(grep "IRC_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}') IRC_PASSWORD=$(grep "IRC_PASSWORD" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
@ -1821,7 +1821,7 @@ function mesh_cjdns {
echo $"cjdns password: $CJDNS_PASSWORD" >> /home/$MY_USERNAME/README echo $"cjdns password: $CJDNS_PASSWORD" >> /home/$MY_USERNAME/README
echo $"cjdns port: $CJDNS_PORT" >> /home/$MY_USERNAME/README echo $"cjdns port: $CJDNS_PORT" >> /home/$MY_USERNAME/README
echo '' >> /home/$MY_USERNAME/README echo '' >> /home/$MY_USERNAME/README
echo $"Forward port $CJDNS_PORT from your internet router to the Freedombone" >> /home/$MY_USERNAME/README echo $"Forward port $CJDNS_PORT from your internet router to the ${PROJECT_NAME}" >> /home/$MY_USERNAME/README
echo '' >> /home/$MY_USERNAME/README echo '' >> /home/$MY_USERNAME/README
echo $'Below is an example of your connection credentials' >> /home/$MY_USERNAME/README echo $'Below is an example of your connection credentials' >> /home/$MY_USERNAME/README
echo $'that you can give to other people so they can connect' >> /home/$MY_USERNAME/README echo $'that you can give to other people so they can connect' >> /home/$MY_USERNAME/README
@ -5188,12 +5188,12 @@ function import_email {
if [[ $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then if [[ $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_NONMAILBOX" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
return return
fi fi
EMAIL_COMPLETE_MSG=$' EMAIL_COMPLETE_MSG=$"
*** Freedombone mailbox installation is complete *** *** ${PROJECT_NAME} mailbox installation is complete ***
Now on your internet router forward ports Now on your internet router forward ports
25, 587, 465, 993 and 2222 to the freedombone 25, 587, 465, 993 and 2222 to the ${PROJECT_NAME}
' "
if grep -Fxq "import_email" $COMPLETION_FILE; then if grep -Fxq "import_email" $COMPLETION_FILE; then
if [[ $SYSTEM_TYPE == "$VARIANT_MAILBOX" ]]; then if [[ $SYSTEM_TYPE == "$VARIANT_MAILBOX" ]]; then
backup_to_friends_servers backup_to_friends_servers
@ -5599,7 +5599,7 @@ function install_owncloud {
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
return return
fi fi
OWNCLOUD_COMPLETION_MSG1=$" *** Freedombone $SYSTEM_TYPE is now installed ***" OWNCLOUD_COMPLETION_MSG1=$" *** ${PROJECT_NAME} $SYSTEM_TYPE is now installed ***"
OWNCLOUD_COMPLETION_MSG2=$"Open $OWNCLOUD_DOMAIN_NAME in a web browser to complete the setup" OWNCLOUD_COMPLETION_MSG2=$"Open $OWNCLOUD_DOMAIN_NAME in a web browser to complete the setup"
if grep -Fxq "install_owncloud" $COMPLETION_FILE; then if grep -Fxq "install_owncloud" $COMPLETION_FILE; then
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" ]]; then if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" ]]; then
@ -6624,11 +6624,11 @@ function install_irc_server {
sed -i 's|;DHFile = /etc/ngircd/dhparams.pem|DHFile = /etc/ssl/certs/ngircd.dhparam|g' /etc/ngircd/ngircd.conf sed -i 's|;DHFile = /etc/ngircd/dhparams.pem|DHFile = /etc/ssl/certs/ngircd.dhparam|g' /etc/ngircd/ngircd.conf
sed -i 's|;KeyFile = /etc/ssl/private/server.key|KeyFile = /etc/ssl/private/ngircd.key|g' /etc/ngircd/ngircd.conf sed -i 's|;KeyFile = /etc/ssl/private/server.key|KeyFile = /etc/ssl/private/ngircd.key|g' /etc/ngircd/ngircd.conf
sed -i "s/;Ports =.*/Ports = $IRC_PORT, 9999/g" /etc/ngircd/ngircd.conf sed -i "s/;Ports =.*/Ports = $IRC_PORT, 9999/g" /etc/ngircd/ngircd.conf
sed -i 's/;Name = #ngircd/Name = #freedombone/g' /etc/ngircd/ngircd.conf sed -i "s/;Name = #ngircd/Name = #${PROJECT_NAME}/g" /etc/ngircd/ngircd.conf
sed -i 's/;Topic = Our ngircd testing channel/Topic = Freedombone chat channel/g' /etc/ngircd/ngircd.conf sed -i "s/;Topic = Our ngircd testing channel/Topic = ${PROJECT_NAME} chat channel/g" /etc/ngircd/ngircd.conf
sed -i 's/;MaxUsers = 23/MaxUsers = 23/g' /etc/ngircd/ngircd.conf sed -i 's/;MaxUsers = 23/MaxUsers = 23/g' /etc/ngircd/ngircd.conf
sed -i 's|;KeyFile = /etc/ngircd/#chan.key|KeyFile = /etc/ngircd/#freedombone.key|g' /etc/ngircd/ngircd.conf sed -i "s|;KeyFile = /etc/ngircd/#chan.key|KeyFile = /etc/ngircd/#${PROJECT_NAME}.key|g" /etc/ngircd/ngircd.conf
sed -i 's/;CloakHost = cloaked.host/CloakHost = freedombone/g' /etc/ngircd/ngircd.conf sed -i "s/;CloakHost = cloaked.host/CloakHost = ${PROJECT_NAME}/g" /etc/ngircd/ngircd.conf
IRC_SALT="$(openssl rand -base64 32)" IRC_SALT="$(openssl rand -base64 32)"
if [ -f $IMAGE_PASSWORD_FILE ]; then if [ -f $IMAGE_PASSWORD_FILE ]; then
IRC_OPERATOR_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)" IRC_OPERATOR_PASSWORD="$(printf `cat $IMAGE_PASSWORD_FILE`)"
@ -6674,7 +6674,7 @@ function install_irc_server {
echo '' >> /home/$MY_USERNAME/README echo '' >> /home/$MY_USERNAME/README
echo " /server add -auto -ssl $DEFAULTDOMAIN $IRC_PORT" >> /home/$MY_USERNAME/README echo " /server add -auto -ssl $DEFAULTDOMAIN $IRC_PORT" >> /home/$MY_USERNAME/README
echo " /connect $DEFAULT_DOMAIN_NAME" >> /home/$MY_USERNAME/README echo " /connect $DEFAULT_DOMAIN_NAME" >> /home/$MY_USERNAME/README
echo ' /join #freedombone' >> /home/$MY_USERNAME/README echo " /join #${PROJECT_NAME}" >> /home/$MY_USERNAME/README
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README
chmod 600 /home/$MY_USERNAME/README chmod 600 /home/$MY_USERNAME/README
fi fi
@ -8181,7 +8181,7 @@ function install_dlna_server {
else else
sed -i 's/#network_interface=/network_interface=$WIFI_INTERFACE/g' /etc/minidlna.conf sed -i 's/#network_interface=/network_interface=$WIFI_INTERFACE/g' /etc/minidlna.conf
fi fi
sed -i 's/#friendly_name=/friendly_name="Freedombone Media"/g' /etc/minidlna.conf sed -i "s/#friendly_name=/friendly_name=\"${PROJECT_NAME} Media\"/g" /etc/minidlna.conf
sed -i 's|#db_dir=/var/cache/minidlna|db_dir=/var/cache/minidlna|g' /etc/minidlna.conf sed -i 's|#db_dir=/var/cache/minidlna|db_dir=/var/cache/minidlna|g' /etc/minidlna.conf
sed -i 's/#inotify=yes/inotify=yes/g' /etc/minidlna.conf sed -i 's/#inotify=yes/inotify=yes/g' /etc/minidlna.conf
sed -i 's/#notify_interval=895/notify_interval=300/g' /etc/minidlna.conf sed -i 's/#notify_interval=895/notify_interval=300/g' /etc/minidlna.conf
@ -9018,8 +9018,8 @@ function install_final {
echo 'install_final' >> $COMPLETION_FILE echo 'install_final' >> $COMPLETION_FILE
clear clear
echo '' echo ''
echo $' echo $"
*** Freedombone installation is complete. Rebooting... *** *** ${PROJECT_NAME} installation is complete. Rebooting... ***
Now forward these ports from your internet router Now forward these ports from your internet router
@ -9042,7 +9042,7 @@ function install_final {
VoIP 5060 VoIP 5060
Tox 33445 Tox 33445
IPFS 4001 IPFS 4001
' "
if [ -f "/home/$MY_USERNAME/README" ]; then if [ -f "/home/$MY_USERNAME/README" ]; then
echo $"See /home/$MY_USERNAME/README for post-installation instructions." echo $"See /home/$MY_USERNAME/README for post-installation instructions."
echo '' echo ''
@ -9157,5 +9157,5 @@ repair_databases_script
backup_to_friends_servers backup_to_friends_servers
intrusion_detection intrusion_detection
install_final install_final
echo 'Freedombone installation is complete' echo "${PROJECT_NAME} installation is complete"
exit 0 exit 0