mattermost/backup-mattermost.sh

21 lines
388 B
Bash

if [ "$1" == "pre-backup" ]; then
exit
fi
if [ "$1" == "pre-backup" ]; then
exit
fi
if [ "$1" == "pre-restore" ]; then
# kill the running plugins that need to be overwritten
pkill -f '.*plugins'
sleep 40
pkill -f '.*plugins'
sleep 40
pkill -f '.*plugins'
fi
if [ "$1" == "post-restore" ]; then
# kill mattermost so that the container restarts
pkill -f mattermost
fi