puppet/modules/rhizo_base/files/bin/notify-freeswitch.sh
Keith Whyte 51760b1bcf Multiple user config changes
Starting to make the system operable without using root.

Changes to groups, sudo, some file permissions.
Places all the user key config into users.pp
2023-03-18 22:46:11 +01:00

17 lines
504 B
Bash
Executable file

#!/bin/bash
# Puppet has made some change that requires a Freeswitch restart.
# Place flag file anyway as fallback. Service will delete it
if [ ! -f /tmp/FS-dirty ] ; then
echo 1 > /tmp/FS-dirty
fi
if [ `/usr/bin/fs_cli -x 'fsctl shutdown_check'` == "true" ] ; then
exit
fi
# Trigger an "elegant" shutdown -
# (Shutdown when there are no active calls, but don't disable service in the meantime)
# This won't return until FS actually shuts down.
exec /usr/bin/fs_cli -x 'fsctl shutdown elegant' &