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
|
||||
if [ $MICROBLOG_DOMAIN_NAME ]; then
|
||||
# stop the daemons
|
||||
cd /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs
|
||||
scripts/stopdaemons.sh
|
||||
|
||||
restore_database gnusocial ${MICROBLOG_DOMAIN_NAME}
|
||||
if [ -d /root/tempgnusocial ]; then
|
||||
rm -rf /root/tempgnusocial
|
||||
fi
|
||||
|
||||
# start the daemons
|
||||
cd /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs
|
||||
scripts/startdaemons.sh
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -701,10 +701,19 @@ function restore_gnu_social {
|
|||
fi
|
||||
if grep -q "GNU Social domain" $COMPLETION_FILE; then
|
||||
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}
|
||||
if [ -d /root/tempgnusocial ]; then
|
||||
rm -rf /root/tempgnusocial
|
||||
fi
|
||||
|
||||
# start the daemons
|
||||
cd /var/www/${MICROBLOG_DOMAIN_NAME}/htdocs
|
||||
scripts/startdaemons.sh
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue