Stop and restart daemons when restoring gnusocial from backup
This commit is contained in:
parent
665fe8f761
commit
5a30e23944
|
@ -836,10 +836,18 @@ function restore_gnu_social {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ $MICROBLOG_DOMAIN_NAME ]; then
|
if [ $MICROBLOG_DOMAIN_NAME ]; then
|
||||||
|
# stop the daemons
|
||||||
|
cd /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs
|
||||||
|
scripts/stopdaemons.sh
|
||||||
|
|
||||||
restore_database gnusocial ${MICROBLOG_DOMAIN_NAME}
|
restore_database gnusocial ${MICROBLOG_DOMAIN_NAME}
|
||||||
if [ -d /root/tempgnusocial ]; then
|
if [ -d /root/tempgnusocial ]; then
|
||||||
rm -rf /root/tempgnusocial
|
rm -rf /root/tempgnusocial
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# start the daemons
|
||||||
|
cd /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs
|
||||||
|
scripts/startdaemons.sh
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -701,10 +701,19 @@ function restore_gnu_social {
|
||||||
fi
|
fi
|
||||||
if grep -q "GNU Social domain" $COMPLETION_FILE; then
|
if grep -q "GNU Social domain" $COMPLETION_FILE; then
|
||||||
MICROBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "GNU Social domain" | awk -F ':' '{print $2}')
|
MICROBLOG_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "GNU Social domain" | awk -F ':' '{print $2}')
|
||||||
|
|
||||||
|
# stop the daemons
|
||||||
|
cd /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs
|
||||||
|
scripts/stopdaemons.sh
|
||||||
|
|
||||||
restore_database_from_friend gnusocial ${MICROBLOG_DOMAIN_NAME}
|
restore_database_from_friend gnusocial ${MICROBLOG_DOMAIN_NAME}
|
||||||
if [ -d /root/tempgnusocial ]; then
|
if [ -d /root/tempgnusocial ]; then
|
||||||
rm -rf /root/tempgnusocial
|
rm -rf /root/tempgnusocial
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# start the daemons
|
||||||
|
cd /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs
|
||||||
|
scripts/startdaemons.sh
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue