Skip to content
Snippets Groups Projects
Commit df9468a1 authored by Bob Mottram's avatar Bob Mottram
Browse files

Function to remove webmail

parent 8afe6548
No related branches found
No related tags found
No related merge requests found
......@@ -33,15 +33,33 @@ WEBMAIL_COMMIT='78cf9c2e5cff2d78cd8beb647d60570f195a2a9c'
WEBMAIL_ONION_HOSTNAME=
WEBMAIL_ONION_PORT=8097
WEBMAIL_ADMIN_PASSWORD=
WEB_PATH=/var/www
WEBMAIL_PATH=$WEB_PATH/webmail
function remove_webmail {
if ! grep -Fxq "install_webmail" $COMPLETION_FILE; then
return
fi
nginx_dissite webmail
if [ -f /etc/nginx/sites-available/webmail ]; then
rm /etc/nginx/sites-available/webmail
fi
function_check remove_onion_service
remove_onion_service webmail ${WEBMAIL_ONION_PORT}
function_check drop_database
drop_database webmain
if [ -d $WEB_PATH/webmail ]; then
rm -rf $WEB_PATH/webmail
fi
sed -i '/Webmail /d' $COMPLETION_FILE
sed -i '/install_webmail/d' $COMPLETION_FILE
}
function install_webmail {
if [[ $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
return
fi
WEB_PATH=/var/www
WEBMAIL_PATH=$WEB_PATH/webmail
# update to a new commit if needed
function_check set_repo_commit
set_repo_commit $WEBMAIL_PATH "Webmail commit" "$WEBMAIL_COMMIT" $WEBMAIL_REPO
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment