Function to remove webmail
This commit is contained in:
parent
8afe6548f9
commit
df9468a1a4
|
@ -33,15 +33,33 @@ WEBMAIL_COMMIT='78cf9c2e5cff2d78cd8beb647d60570f195a2a9c'
|
||||||
WEBMAIL_ONION_HOSTNAME=
|
WEBMAIL_ONION_HOSTNAME=
|
||||||
WEBMAIL_ONION_PORT=8097
|
WEBMAIL_ONION_PORT=8097
|
||||||
WEBMAIL_ADMIN_PASSWORD=
|
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 {
|
function install_webmail {
|
||||||
if [[ $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
if [[ $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
WEB_PATH=/var/www
|
|
||||||
WEBMAIL_PATH=$WEB_PATH/webmail
|
|
||||||
|
|
||||||
# update to a new commit if needed
|
# update to a new commit if needed
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue