Function to remove wiki
This commit is contained in:
parent
df9468a1a4
commit
eadc7fc342
|
@ -34,6 +34,32 @@ WIKI_TITLE="${PROJECT_NAME} Wiki"
|
||||||
WIKI_CODE=
|
WIKI_CODE=
|
||||||
WIKI_ONION_PORT=8089
|
WIKI_ONION_PORT=8089
|
||||||
|
|
||||||
|
function remove_wiki {
|
||||||
|
if ! grep -Fxq "install_wiki" $COMPLETION_FILE; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
function_check remove_onion_service
|
||||||
|
remove_onion_service wiki ${WIKI_ONION_PORT}
|
||||||
|
nginx_dissite $WIKI_DOMAIN_NAME
|
||||||
|
if [ -f /etc/nginx/sites-available/$WIKI_DOMAIN_NAME ]; then
|
||||||
|
rm /etc/nginx/sites-available/$WIKI_DOMAIN_NAME
|
||||||
|
fi
|
||||||
|
apt-get -y remove --purge dokuwiki
|
||||||
|
if [ ! -d /var/www/$WIKI_DOMAIN_NAME ]; then
|
||||||
|
rm -rf /var/www/$WIKI_DOMAIN_NAME
|
||||||
|
fi
|
||||||
|
if [ -d /var/lib/dokuwiki ]; then
|
||||||
|
rm -rf /var/lib/dokuwiki
|
||||||
|
fi
|
||||||
|
if [ -d /etc/dokuwiki ]; then
|
||||||
|
rm -rf /etc/dokuwiki
|
||||||
|
fi
|
||||||
|
if [ -d /usr/share/dokuwiki ]; then
|
||||||
|
rm -rf /usr/share/dokuwiki
|
||||||
|
fi
|
||||||
|
sed -i '/install_wiki/d' $COMPLETION_FILE
|
||||||
|
}
|
||||||
|
|
||||||
function get_wiki_admin_password {
|
function get_wiki_admin_password {
|
||||||
if [ -f /home/$MY_USERNAME/README ]; then
|
if [ -f /home/$MY_USERNAME/README ]; then
|
||||||
if grep -q "Wiki password" /home/$MY_USERNAME/README; then
|
if grep -q "Wiki password" /home/$MY_USERNAME/README; then
|
||||||
|
|
Loading…
Reference in New Issue