Flag to indicate whether apps have installed

This commit is contained in:
Bob Mottram 2016-10-10 19:11:33 +01:00
parent 1737d872a7
commit 6190639144
27 changed files with 75 additions and 13 deletions

View File

@ -37,6 +37,7 @@ babel_variables=()
function install_interactive_babel {
echo -n ''
APP_INSTALLED=1
}
function change_password_babel {
@ -114,6 +115,7 @@ function install_babel {
function_check configure_firewall_for_babel
configure_firewall_for_babel
APP_INSTALLED=1
}
# NOTE: deliberately there is no "exit 0"

View File

@ -38,6 +38,7 @@ batman_variables=(MY_USERNAME
function install_interactive_batman {
echo -n ''
APP_INSTALLED=1
}
function change_password_batman {
@ -162,6 +163,7 @@ function install_batman {
function_check configure_firewall_for_batman
configure_firewall_for_batman
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -165,10 +165,11 @@ function install_interactive_blog {
fi
done
write_config_param "MY_BLOG_TITLE" "$MY_BLOG_TITLE"
write_config_param "FULLBLOG_DOMAIN_NAME" "$FULLBLOG_DOMAIN_NAME"
write_config_param "FULLBLOG_CODE" "$FULLBLOG_CODE"
fi
write_config_param "MY_BLOG_TITLE" "$MY_BLOG_TITLE"
write_config_param "FULLBLOG_DOMAIN_NAME" "$FULLBLOG_DOMAIN_NAME"
APP_INSTALLED=1
}
function change_password_blog {
@ -675,6 +676,7 @@ function install_blog {
if ! grep -q "blog domain:" $COMPLETION_FILE; then
echo "blog domain:$FULLBLOG_DOMAIN_NAME" >> $COMPLETION_FILE
fi
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -44,6 +44,7 @@ function configure_interactive_blogstatic {
function install_interactive_blogstatic {
echo -n ''
APP_INSTALLED=1
}
function change_password_blogstatic {
@ -341,6 +342,7 @@ function install_blogstatic {
chown -R $MY_USERNAME:$MY_USERNAME $STATIC_BLOG_INSTALL_DIR
chown -R www-data:www-data $STATIC_BLOG_PATH
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -53,6 +53,7 @@ cjdns_variables=(MY_USERNAME
function install_interactive_cjdns {
echo -n ''
APP_INSTALLED=1
}
function change_password_cjdns {
@ -546,6 +547,7 @@ function install_cjdns {
install_cjdns_main
install_cjdns_tools
install_completed cjdns
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -62,6 +62,7 @@ function configure_interactive_dlna {
function install_interactive_dlna {
echo -n ''
APP_INSTALLED=1
}
function change_password_dlna {
@ -264,6 +265,7 @@ function script_for_attaching_usb_drive {
function install_dlna {
install_dlna_main
script_for_attaching_usb_drive
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -35,6 +35,7 @@ emacs_variables=(USB_MOUNT
function install_interactive_emacs {
echo -n ''
APP_INSTALLED=1
}
function change_password_emacs {
@ -185,6 +186,7 @@ function install_emacs {
echo '(epa-file-enable)' >> /home/$MY_USERNAME/.emacs
cp /home/$MY_USERNAME/.emacs /root/.emacs
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.emacs
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -165,11 +165,12 @@ function install_interactive_gnusocial {
fi
done
# save the results in the config file
write_config_param "MICROBLOG_DOMAIN_NAME" "$MICROBLOG_DOMAIN_NAME"
write_config_param "MICROBLOG_CODE" "$MICROBLOG_CODE"
write_config_param "MICROBLOG_WELCOME_MESSAGE" "$MICROBLOG_WELCOME_MESSAGE"
write_config_param "MICROBLOG_BACKGROUND_IMAGE_URL" "$MICROBLOG_BACKGROUND_IMAGE_URL"
fi
write_config_param "MICROBLOG_DOMAIN_NAME" "$MICROBLOG_DOMAIN_NAME"
APP_INSTALLED=1
}
function change_password_gnusocial {
@ -1032,6 +1033,7 @@ function install_gnusocial {
install_gnusocial_plugin_sharings
install_gnusocial_plugin_sharings_theme
install_gnusocial_plugin_nsfw
APP_INSTALLED=1
}
# NOTE: deliberately there is no "exit 0"

View File

@ -104,9 +104,10 @@ function install_interactive_gogs {
done
# save the results in the config file
write_config_param "GIT_DOMAIN_NAME" "$GIT_DOMAIN_NAME"
write_config_param "GIT_CODE" "$GIT_CODE"
fi
write_config_param "GIT_DOMAIN_NAME" "$GIT_DOMAIN_NAME"
APP_INSTALLED=1
}
function change_password_gogs {
@ -728,6 +729,7 @@ function install_gogs {
else
sed -i "s|gogs version.*|gogs version:${GOGS_VERSION}|g" ${COMPLETION_FILE}
fi
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -188,6 +188,7 @@ function install_interactive_hubzilla {
# save the results in the config file
write_config_param "HUBZILLA_DOMAIN_NAME" "$HUBZILLA_DOMAIN_NAME"
write_config_param "HUBZILLA_CODE" "$HUBZILLA_CODE"
APP_INSTALLED=1
}
function change_password_hubzilla {
@ -647,6 +648,7 @@ function install_hubzilla {
${PROJECT_NAME}-addemail -u $MY_USERNAME -e "noreply@$HUBZILLA_DOMAIN_NAME" -g hubzilla --public no
echo "hubzilla domain:${HUBZILLA_DOMAIN_NAME}" >> $COMPLETION_FILE
APP_INSTALLED=1
}
# NOTE: deliberately there is no "exit 0"

View File

@ -48,6 +48,7 @@ ipfs_variables=(IPFS_COMMIT
function install_interactive_ipfs {
echo -n ''
APP_INSTALLED=1
}
function change_password_ipfs {
@ -601,4 +602,5 @@ function install_ipfs_go {
function install_ipfs {
#install_ipfs_js
install_ipfs_go
APP_INSTALLED=1
}

View File

@ -202,6 +202,7 @@ function configure_interactive_irc {
function install_interactive_irc {
echo -n ''
APP_INSTALLED=1
}
function change_password_irc {
@ -458,6 +459,7 @@ function install_irc_client {
function install_irc {
install_irc_server
install_irc_client
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -45,6 +45,7 @@ librevault_variables=(PROTOBUF_REPO
function install_interactive_librevault {
echo -n ''
APP_INSTALLED=1
}
function change_password_librevault {
@ -324,6 +325,7 @@ function install_librevault {
systemctl enable librevault-daemon
systemctl start librevault-daemon
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -99,9 +99,10 @@ function install_interactive_mediagoblin {
done
# save the results in the config file
write_config_param "MEDIAGOBLIN_DOMAIN_NAME" "$MEDIAGOBLIN_DOMAIN_NAME"
write_config_param "MEDIAGOBLIN_CODE" "$MEDIAGOBLIN_CODE"
fi
write_config_param "MEDIAGOBLIN_DOMAIN_NAME" "$MEDIAGOBLIN_DOMAIN_NAME"
APP_INSTALLED=1
}
function change_password_mediagoblin {
@ -501,6 +502,7 @@ function install_mediagoblin {
else
sed -i "s/Mediagoblin domain.*/Mediagoblin domain:$MEDIAGOBLIN_DOMAIN_NAME/g" $COMPLETION_FILE
fi
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -47,6 +47,7 @@ mumble_variables=(MY_USERNAME
function install_interactive_mumble {
echo -n ''
APP_INSTALLED=1
}
function change_password_mumble {
@ -281,6 +282,7 @@ function install_mumble {
function_check configure_firewall_for_mumble
configure_firewall_for_mumble
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -53,6 +53,7 @@ rss_variables=(RSS_READER_REPO
function install_interactive_rss {
echo -n ''
APP_INSTALLED=1
}
function change_password_rss {
@ -605,6 +606,7 @@ function install_rss {
install_rss_main
install_rss_gnusocial
install_rss_mobile_reader
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -47,6 +47,7 @@ searx_variables=(SEARX_REPO
function install_interactive_searx {
echo -n ''
APP_INSTALLED=1
}
function change_password_searx {
@ -288,6 +289,7 @@ function install_searx {
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README
chmod 600 /home/$MY_USERNAME/README
fi
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -86,6 +86,7 @@ function add_user_sip {
function install_interactive_sip {
echo -n ''
APP_INSTALLED=1
}
function change_password_sip {
@ -498,6 +499,7 @@ function install_sip_turn {
function install_sip {
install_sip_main
update_sipwitch_daemon
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -222,6 +222,7 @@ function run_client_syncthing {
function install_interactive_syncthing {
echo -n ''
APP_INSTALLED=1
}
function change_password_syncthing {
@ -560,6 +561,7 @@ function install_syncthing {
function_check configure_firewall_for_syncthing
configure_firewall_for_syncthing
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -45,6 +45,7 @@ tahoelafs_variables=(TAHOELAFS_REPO
function install_interactive_tahoelafs {
echo -n ''
APP_INSTALLED=1
}
function change_password_tahoelafs {
@ -357,6 +358,7 @@ function install_tahoelafs {
systemctl enable tahoelafs
systemctl daemon-reload
systemctl start tahoelafs
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -100,6 +100,7 @@ function run_client_tox {
function install_interactive_tox {
echo -n ''
APP_INSTALLED=1
}
function change_password_tox {
@ -706,6 +707,7 @@ function install_tox {
tox_avahi
install_tox_client
fi
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -34,6 +34,7 @@ vpn_variables=()
function install_interactive_vpn {
echo -n ''
APP_INSTALLED=1
}
function change_password_vpn {
@ -83,6 +84,7 @@ function install_vpn {
exit 52026
fi
fi
APP_INSTALLED=1
}
# NOTE: deliberately there is no "exit 0"

View File

@ -46,6 +46,7 @@ webmail_variables=(WEBMAIL_REPO
function install_interactive_webmail {
echo -n ''
APP_INSTALLED=1
}
function change_password_webmail {
@ -259,6 +260,7 @@ function install_webmail {
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README
chmod 600 /home/$MY_USERNAME/README
fi
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -99,10 +99,11 @@ function install_interactive_wiki {
done
# save the results in the config file
write_config_param "WIKI_TITLE" "$WIKI_TITLE"
write_config_param "WIKI_DOMAIN_NAME" "$WIKI_DOMAIN_NAME"
write_config_param "WIKI_CODE" "$WIKI_CODE"
fi
write_config_param "WIKI_TITLE" "$WIKI_TITLE"
write_config_param "WIKI_DOMAIN_NAME" "$WIKI_DOMAIN_NAME"
APP_INSTALLED=1
}
function change_password_wiki {
@ -614,6 +615,7 @@ function install_wiki {
else
sed -i "s|wiki domain.*|wiki domain:$WIKI_DOMAIN_NAME|g" $COMPLETION_FILE
fi
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -96,6 +96,7 @@ function run_client_xmpp {
function install_interactive_xmpp {
echo -n ''
APP_INSTALLED=1
}
function change_password_xmpp {
@ -554,6 +555,7 @@ function install_xmpp_client {
function install_xmpp {
install_xmpp_main
install_xmpp_client
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -61,6 +61,7 @@ zeronet_variables=(ZERONET_BLOG_COMMIT
function install_interactive_zeronet {
echo -n ''
APP_INSTALLED=1
}
function change_password_zeronet {
@ -686,6 +687,7 @@ function install_zeronet {
install_zeronet_blog
install_zeronet_mail
install_zeronet_forum
APP_INSTALLED=1
}
# NOTE: deliberately no exit 0

View File

@ -402,10 +402,15 @@ function install_apps {
echo $"${a} was upgraded from interactive"
else
echo $"Installing application from interactive: ${a}"
APP_INSTALLED=
install_${a}
app_save_variables ${a}
install_completed ${a}
echo $"${a} was installed from interactive"
if [ $APP_INSTALLED ]; then
app_save_variables ${a}
install_completed ${a}
echo $"${a} was installed from interactive"
else
echo $"${a} was not installed from interactive"
fi
fi
else
# check if the app was removed
@ -417,10 +422,15 @@ function install_apps {
echo $"${a} was upgraded"
else
echo $"Installing application: ${a}"
APP_INSTALLED=
install_${a}
app_save_variables ${a}
install_completed ${a}
echo $"${a} was installed"
if [ $APP_INSTALLED ]; then
app_save_variables ${a}
install_completed ${a}
echo $"${a} was installed"
else
echo $"${a} was not installed"
fi
fi
else
echo $"${a} has been removed and so will not be reinstalled"