This commit is contained in:
Bob Mottram 2016-10-01 19:52:39 +01:00
parent 4956701174
commit 68ed1a81df
13 changed files with 32 additions and 53 deletions

View File

@ -180,9 +180,10 @@ function reconfigure_blog {
} }
function upgrade_blog { function upgrade_blog {
if ! grep -Fxq "install_blog" $COMPLETION_FILE; then if grep -q "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE; then
return FULLBLOG_DOMAIN_NAME=$(grep "FULLBLOG_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
function_check set_repo_commit function_check set_repo_commit
set_repo_commit /var/www/$FULLBLOG_DOMAIN_NAME/htdocs "Blog commit" "$FULLBLOG_COMMIT" $FULLBLOG_REPO set_repo_commit /var/www/$FULLBLOG_DOMAIN_NAME/htdocs "Blog commit" "$FULLBLOG_COMMIT" $FULLBLOG_REPO

View File

@ -222,8 +222,8 @@ function reconfigure_gnusocial {
} }
function upgrade_gnusocial { function upgrade_gnusocial {
if ! grep -Fxq "install_gnusocial_main" $COMPLETION_FILE; then if grep -q "GNU Social domain" $COMPLETION_FILE; then
return MICROBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "GNU Social domain" | head -n 1 | awk -F ':' '{print $2}')
fi fi
# update to the next commit # update to the next commit

View File

@ -183,10 +183,6 @@ function reconfigure_gogs {
} }
function upgrade_gogs { function upgrade_gogs {
if ! grep -Fxq "install_gogs" $COMPLETION_FILE; then
return
fi
if ! grep -q "Gogs version:" $COMPLETION_FILE; then if ! grep -q "Gogs version:" $COMPLETION_FILE; then
return return
fi fi

View File

@ -250,9 +250,10 @@ function reconfigure_hubzilla {
} }
function upgrade_hubzilla { function upgrade_hubzilla {
if ! grep -Fxq "install_hubzilla" $COMPLETION_FILE; then if grep -q "HUBZILLA_DOMAIN_NAME" $CONFIGURATION_FILE; then
return HUBZILLA_DOMAIN_NAME=$(grep "HUBZILLA_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi fi
HUBZILLA_PATH=/var/www/$HUBZILLA_DOMAIN_NAME/htdocs HUBZILLA_PATH=/var/www/$HUBZILLA_DOMAIN_NAME/htdocs
function_check set_repo_commit function_check set_repo_commit

View File

@ -54,7 +54,7 @@ function reconfigure_ipfs {
} }
function upgrade_ipfs_go { function upgrade_ipfs_go {
if ! grep -Fxq "install_ipfs_go" $COMPLETION_FILE; then if [[ $(app_is_installed ipfs_go) == "0" ]]; then
return return
fi fi
@ -63,7 +63,7 @@ function upgrade_ipfs_go {
} }
function upgrade_ipfs_js { function upgrade_ipfs_js {
if ! grep -Fxq "install_ipfs_js" $COMPLETION_FILE; then if [[ $(app_is_installed ipfs_js) == "0" ]]; then
return return
fi fi

View File

@ -186,7 +186,7 @@ function configure_firewall_for_irc {
} }
function install_irc_server { function install_irc_server {
if grep -Fxq "install_irc_server" $COMPLETION_FILE; then if [[ $(app_is_installed irc_server) == "1" ]]; then
return return
fi fi
apt-get -y install ngircd apt-get -y install ngircd
@ -293,7 +293,7 @@ function install_irc_server {
} }
function install_irc_client { function install_irc_client {
if grep -Fxq "install_irc_client" $COMPLETION_FILE; then if [[ $(app_is_installed irc_client) == "1" ]]; then
return return
fi fi
apt-get -y install irssi apt-get -y install irssi

View File

@ -51,10 +51,6 @@ function reconfigure_librevault {
} }
function upgrade_librevault { function upgrade_librevault {
if ! grep -Fxq "install_librevault" $COMPLETION_FILE; then
return
fi
function_check set_repo_commit function_check set_repo_commit
if [ -d $INSTALL_DIR/protobuf ]; then if [ -d $INSTALL_DIR/protobuf ]; then

View File

@ -51,10 +51,6 @@ function reconfigure_searx {
} }
function upgrade_searx { function upgrade_searx {
if ! grep -Fxq "install_searx" $COMPLETION_FILE; then
return
fi
set_repo_commit $SEARX_PATH/searx "Search engine commit" "$SEARX_COMMIT" $SEARX_REPO set_repo_commit $SEARX_PATH/searx "Search engine commit" "$SEARX_COMMIT" $SEARX_REPO
if grep "Search engine key" $COMPLETION_FILE; then if grep "Search engine key" $COMPLETION_FILE; then
if [ -f ${SEARX_PATH}/searx/searx/settings.yml ]; then if [ -f ${SEARX_PATH}/searx/searx/settings.yml ]; then

View File

@ -221,7 +221,7 @@ function update_sipwitch_daemon {
} }
function install_sip_main { function install_sip_main {
if grep -Fxq "install_sip_main" $COMPLETION_FILE; then if [[ $(app_is_installed sip_main) == "1" ]]; then
return return
fi fi
@ -301,11 +301,11 @@ function install_sip_main {
function_check configure_firewall_for_sip4 function_check configure_firewall_for_sip4
configure_firewall_for_sip4 configure_firewall_for_sip4
echo 'install_sip_main' >> $COMPLETION_FILE install_completed sip_main
} }
function install_sip_turn { function install_sip_turn {
if grep -Fxq "install_sip_turn" $COMPLETION_FILE; then if [[ $(app_is_installed sip_turn) == "1" ]]; then
return return
fi fi
@ -442,7 +442,7 @@ function install_sip_turn {
function_check configure_firewall_for_voip_turn function_check configure_firewall_for_voip_turn
configure_firewall_for_voip_turn configure_firewall_for_voip_turn
echo 'install_sip_turn' >> $COMPLETION_FILE install_completed sip_turn
} }
function install_sip { function install_sip {

View File

@ -105,9 +105,6 @@ function reconfigure_tox {
} }
function upgrade_tox { function upgrade_tox {
if ! grep -Fxq "install_tox" $COMPLETION_FILE; then
return
fi
function_check set_repo_commit function_check set_repo_commit
set_repo_commit $INSTALL_DIR/toxcore "toxcore commit" "$TOXCORE_COMMIT" $TOXCORE_REPO set_repo_commit $INSTALL_DIR/toxcore "toxcore commit" "$TOXCORE_COMMIT" $TOXCORE_REPO
@ -316,7 +313,7 @@ function tox_avahi {
} }
function install_tox_node { function install_tox_node {
if grep -Fxq "install_tox_node" $COMPLETION_FILE; then if [[ $(app_is_installed tox_node) == "1" ]]; then
return return
fi fi
@ -355,18 +352,18 @@ function install_tox_node {
function_check configure_firewall_for_tox function_check configure_firewall_for_tox
configure_firewall_for_tox configure_firewall_for_tox
echo 'install_tox_node' >> $COMPLETION_FILE install_completed tox_node
} }
function install_tox_client { function install_tox_client {
if grep -Fxq "install_tox_client" $COMPLETION_FILE; then if [[ $(app_is_installed tox_client) == "1" ]]; then
return return
fi fi
function_check mesh_tox_client function_check mesh_tox_client
mesh_tox_client mesh_tox_client
echo 'install_tox_client' >> $COMPLETION_FILE install_completed tox_client
} }
function mesh_tox_node { function mesh_tox_node {

View File

@ -76,9 +76,6 @@ function reconfigure_webmail {
} }
function upgrade_webmail { function upgrade_webmail {
if ! grep -Fxq "install_webmail" $COMPLETION_FILE; then
return
fi
function_check set_repo_commit function_check set_repo_commit
set_repo_commit $WEBMAIL_PATH "Webmail commit" "$WEBMAIL_COMMIT" $WEBMAIL_REPO set_repo_commit $WEBMAIL_PATH "Webmail commit" "$WEBMAIL_COMMIT" $WEBMAIL_REPO
} }

View File

@ -117,9 +117,6 @@ function update_prosody_modules {
} }
function upgrade_xmpp { function upgrade_xmpp {
if ! grep -Fxq "install_xmpp_main" $COMPLETION_FILE; then
return
fi
function_check update_prosody_modules function_check update_prosody_modules
update_prosody_modules update_prosody_modules
} }
@ -259,7 +256,7 @@ function xmpp_email_headers {
function install_xmpp_main { function install_xmpp_main {
update_prosody_modules update_prosody_modules
if grep -Fxq "install_xmpp_main" $COMPLETION_FILE; then if [[ $(app_is_installed xmpp_main) == "1" ]]; then
return return
fi fi
apt-get -y install lua-sec lua-bitop apt-get -y install lua-sec lua-bitop
@ -431,11 +428,11 @@ function install_xmpp_main {
configure_firewall_for_xmpp configure_firewall_for_xmpp
xmpp_email_headers xmpp_email_headers
echo 'install_xmpp_main' >> $COMPLETION_FILE install_completed xmpp_main
} }
function install_xmpp_client { function install_xmpp_client {
if grep -Fxq "install_xmpp_client" $COMPLETION_FILE; then if [[ $(app_is_installed xmpp_client) == "1" ]]; then
return return
fi fi
apt-get -y install profanity apt-get -y install profanity
@ -498,7 +495,7 @@ function install_xmpp_client {
chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.local chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.local
chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.config chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.config
echo 'install_xmpp_client' >> $COMPLETION_FILE install_completed xmpp_client
} }
function install_xmpp { function install_xmpp {

View File

@ -62,9 +62,6 @@ function reconfigure_zeronet {
} }
function upgrade_zeronet { function upgrade_zeronet {
if ! grep -Fxq "install_zeronet" $COMPLETION_FILE; then
return
fi
function_check set_repo_commit function_check set_repo_commit
set_repo_commit $MESH_INSTALL_DIR/zeronet "ZeroNet commit" "$ZERONET_COMMIT" $ZERONET_REPO set_repo_commit $MESH_INSTALL_DIR/zeronet "ZeroNet commit" "$ZERONET_COMMIT" $ZERONET_REPO
set_repo_commit $MESH_INSTALL_DIR/zeronet/ZeroBlog "ZeroNet Blog commit" "$ZERONET_BLOG_COMMIT" $ZERONET_BLOG_REPO set_repo_commit $MESH_INSTALL_DIR/zeronet/ZeroBlog "ZeroNet Blog commit" "$ZERONET_BLOG_COMMIT" $ZERONET_BLOG_REPO
@ -159,7 +156,7 @@ function configure_firewall_for_zeronet {
} }
function install_zeronet_blog { function install_zeronet_blog {
if grep -Fxq "install_zeronet_blog" $COMPLETION_FILE; then if [[ $(app_is_installed zeronet_blog) == "1" ]]; then
return return
fi fi
@ -256,10 +253,11 @@ function install_zeronet_blog {
echo "ZeroNet Blog private key: $ZERONET_BLOG_PRIVATE_KEY" >> /home/$MY_USERNAME/README echo "ZeroNet Blog private key: $ZERONET_BLOG_PRIVATE_KEY" >> /home/$MY_USERNAME/README
fi fi
echo 'install_zeronet_blog' >> $COMPLETION_FILE install_completed zeronet_blog
} }
function install_zeronet_mail { function install_zeronet_mail {
if [[ $(app_is_installed zeronet_mail) == "1" ]]; then
if grep -Fxq "install_zeronet_mail" $COMPLETION_FILE; then if grep -Fxq "install_zeronet_mail" $COMPLETION_FILE; then
return return
fi fi
@ -357,11 +355,11 @@ function install_zeronet_mail {
echo $"ZeroNet Mail private key: $ZERONET_MAIL_PRIVATE_KEY" >> /home/$MY_USERNAME/README echo $"ZeroNet Mail private key: $ZERONET_MAIL_PRIVATE_KEY" >> /home/$MY_USERNAME/README
fi fi
echo 'install_zeronet_mail' >> $COMPLETION_FILE install_completed zeronet_mail
} }
function install_zeronet_forum { function install_zeronet_forum {
if grep -Fxq "install_zeronet_forum" $COMPLETION_FILE; then if [[ $(app_is_installed zeronet_forum) == "1" ]]; then
return return
fi fi
@ -452,11 +450,11 @@ function install_zeronet_forum {
echo $"ZeroNet Forum private key: $ZERONET_FORUM_PRIVATE_KEY" >> /home/$MY_USERNAME/README echo $"ZeroNet Forum private key: $ZERONET_FORUM_PRIVATE_KEY" >> /home/$MY_USERNAME/README
fi fi
echo 'install_zeronet_forum' >> $COMPLETION_FILE install_completed zeronet_forum
} }
function install_zeronet_main { function install_zeronet_main {
if grep -Fxq "install_zeronet_main" $COMPLETION_FILE; then if [[ $(app_is_installed zeronet_main) == "1" ]]; then
return return
fi fi
@ -467,7 +465,7 @@ function install_zeronet_main {
function_check configure_firewall_for_zeronet function_check configure_firewall_for_zeronet
configure_firewall_for_zeronet configure_firewall_for_zeronet
echo 'install_zeronet_main' >> $COMPLETION_FILE install_completed zeronet_main
} }
function mesh_zeronet { function mesh_zeronet {