function to remove gnu social
This commit is contained in:
parent
0f71e54d7c
commit
4d2c1836ac
|
@ -47,6 +47,23 @@ SHARINGS_COMMIT='d5c6c7f855d9afff9086c09ea706f38c859bc0d4'
|
|||
SHARINGS_THEME_REPO="http://git.lasindias.club/manuel/SharingsTheme"
|
||||
SHARINGS_THEME_COMMIT='7106c7ef03'
|
||||
|
||||
function remove_gnu_social {
|
||||
if ! grep -Fxq "install_gnu_social" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
nginx_dissite $MICROBLOG_DOMAIN_NAME
|
||||
if [ -d /var/www/$MICROBLOG_DOMAIN_NAME ]; then
|
||||
rm -rf /var/www/$MICROBLOG_DOMAIN_NAME
|
||||
fi
|
||||
if [ -f /etc/nginx/sites-available/$MICROBLOG_DOMAIN_NAME ]; then
|
||||
rm /etc/nginx/sites-available/$MICROBLOG_DOMAIN_NAME
|
||||
fi
|
||||
function_check drop_database
|
||||
drop_database gnusocial
|
||||
sed -i '/install_gnu_social/d' $COMPLETION_FILE
|
||||
sed -i '/GNU Social /d' $COMPLETION_FILE
|
||||
}
|
||||
|
||||
function install_gnu_social {
|
||||
if [[ $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
||||
return
|
||||
|
|
|
@ -322,4 +322,9 @@ function run_query {
|
|||
mysql -u root --password="$MARIADB_PASSWORD" -e "$database_query" $database_name
|
||||
}
|
||||
|
||||
function drop_database {
|
||||
database_name=$1
|
||||
mysqladmin -uroot -p"$MARIADB_PASSWORD" -f drop $database_name
|
||||
}
|
||||
|
||||
# NOTE: deliberately there is no "exit 0"
|
||||
|
|
Loading…
Reference in New Issue