This commit is contained in:
Bob Mottram 2016-10-18 10:43:08 +01:00
parent d441d19470
commit ad05156395
5 changed files with 12 additions and 13 deletions

View File

@ -185,7 +185,8 @@ function remove_dokuwiki {
if [ -d /usr/share/dokuwiki ]; then if [ -d /usr/share/dokuwiki ]; then
rm -rf /usr/share/dokuwiki rm -rf /usr/share/dokuwiki
fi fi
remove_completion_param install_dokuwiki remove_completion_param "install_dokuwiki"
remove_completion_param "dokuwiki domain"
} }
function get_dokuwiki_admin_password { function get_dokuwiki_admin_password {
@ -278,6 +279,7 @@ function install_dokuwiki {
fi fi
DOKUWIKI_ONION_HOSTNAME=$(add_onion_service dokuwiki 80 ${DOKUWIKI_ONION_PORT}) DOKUWIKI_ONION_HOSTNAME=$(add_onion_service dokuwiki 80 ${DOKUWIKI_ONION_PORT})
set_completion_param "dokuwiki domain" "${DOKUWIKI_DOMAIN_NAME}"
if [[ $ONION_ONLY == "no" ]]; then if [[ $ONION_ONLY == "no" ]]; then
echo 'server {' > /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME echo 'server {' > /etc/nginx/sites-available/$DOKUWIKI_DOMAIN_NAME
@ -564,7 +566,6 @@ function install_dokuwiki {
chmod 600 /home/$MY_USERNAME/README chmod 600 /home/$MY_USERNAME/README
fi fi
set_completion_param "dokuwiki domain" "$DOKUWIKI_DOMAIN_NAME"
APP_INSTALLED=1 APP_INSTALLED=1
} }

View File

@ -345,7 +345,7 @@ function remove_gogs {
rm /etc/systemd/system/gogs.service rm /etc/systemd/system/gogs.service
rm -rf /home/${GOGS_USERNAME}/* rm -rf /home/${GOGS_USERNAME}/*
remove_onion_service gogs ${GIT_ONION_PORT} 9418 remove_onion_service gogs ${GIT_ONION_PORT} 9418
remove_completion_param install_gogs remove_completion_param "install_gogs"
sed -i '/gogs /d' $COMPLETION_FILE sed -i '/gogs /d' $COMPLETION_FILE
} }
@ -566,7 +566,7 @@ function install_gogs {
echo $'Added onion site for Gogs' echo $'Added onion site for Gogs'
fi fi
systemctl restart tor systemctl reload tor
function_check wait_for_onion_service function_check wait_for_onion_service
wait_for_onion_service 'gogs' wait_for_onion_service 'gogs'
@ -583,11 +583,8 @@ function install_gogs {
chmod 600 /home/${MY_USERNAME}/README chmod 600 /home/${MY_USERNAME}/README
fi fi
if ! grep -q "gogs onion domain" ${COMPLETION_FILE}; then set_completion_param "gogs domain" "$GIT_DOMAIN_NAME"
echo "gogs onion domain:${GIT_ONION_HOSTNAME}" >> ${COMPLETION_FILE} set_completion_param "gogs onion domain" "$GIT_ONION_HOSTNAME"
else
sed -i "s|gogs onion domain.*|gogs onion domain:${GIT_ONION_HOSTNAME}|g" ${COMPLETION_FILE}
fi
function_check add_ddns_domain function_check add_ddns_domain
add_ddns_domain ${GIT_DOMAIN_NAME} add_ddns_domain ${GIT_DOMAIN_NAME}

View File

@ -329,9 +329,9 @@ function remove_htmly {
remove_config_param HTMLY_CODE remove_config_param HTMLY_CODE
function_check remove_onion_service function_check remove_onion_service
remove_onion_service htmly ${HTMLY_ONION_PORT} remove_onion_service htmly ${HTMLY_ONION_PORT}
remove_completion_param install_htmly remove_completion_param "install_htmly"
sed -i '/Htmly .*/d' $COMPLETION_FILE sed -i '/Htmly /d' $COMPLETION_FILE
sed -i '/htmly .*/d' $COMPLETION_FILE sed -i '/htmly /d' $COMPLETION_FILE
} }
function get_htmly_admin_password { function get_htmly_admin_password {

View File

@ -404,7 +404,7 @@ function install_irc_client {
echo " port = \"${IRC_PORT}\";" >> /home/${MY_USERNAME}/.irssi/config echo " port = \"${IRC_PORT}\";" >> /home/${MY_USERNAME}/.irssi/config
echo ' use_ssl = "yes";' >> /home/${MY_USERNAME}/.irssi/config echo ' use_ssl = "yes";' >> /home/${MY_USERNAME}/.irssi/config
else else
IRC_ONION_HOSTNAME=$(cat ${COMPLETION_FILE} | grep "irc onion domain" | awk -F ':' '{print $2}') IRC_ONION_HOSTNAME=$(cat ${COMPLETION_FILE} | grep "irc onion domain" | head -n 1 | awk -F ':' '{print $2}')
echo " port = \"${IRC_ONION_PORT}\";" >> /home/${MY_USERNAME}/.irssi/config echo " port = \"${IRC_ONION_PORT}\";" >> /home/${MY_USERNAME}/.irssi/config
echo ' use_ssl = "no";' >> /home/${MY_USERNAME}/.irssi/config echo ' use_ssl = "no";' >> /home/${MY_USERNAME}/.irssi/config
fi fi

View File

@ -86,6 +86,7 @@ function remove_onion_service {
shred -zu /var/lib/tor/hidden_service_${onion_service_name}/* shred -zu /var/lib/tor/hidden_service_${onion_service_name}/*
rm -rf /var/lib/tor/hidden_service_${onion_service_name} rm -rf /var/lib/tor/hidden_service_${onion_service_name}
fi fi
remove_completion_param "${onion_service_name} onion domain"
onion_update onion_update
} }