You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
angie/SOURCES/angie.upgrade

28 lines
591 B

#!/bin/sh
#
# Legacy action script for "service angie upgrade"
prog=angie
angie=/usr/sbin/angie
conffile=/etc/angie/angie.conf
pidfile=/run/angie.pid
oldbinpidfile=${pidfile}.oldbin
${angie} -t -c ${conffile} -q || exit 6
echo -n $"Starting new master $prog: "
pkill -F ${pidfile} ${prog} --signal USR2
echo
for i in `/usr/bin/seq 5`; do
/bin/sleep 1
if [ -f ${oldbinpidfile} -a -f ${pidfile} ]; then
echo -n $"Graceful shutdown of old $prog: "
pkill -F ${oldbinpidfile} ${prog} --signal QUIT
echo
exit 0
fi
done
echo "Upgrade failed!"
exit 1