salt/pkg/salt-minion.sleep
Bernhard M. Wiedemann c2cef98747 Add salt-minion.sleep
for use with systemd to be installed in
/usr/lib/systemd/system-sleep/salt-minion.sleep

To avoid stale minion-master connections as described in
https://bugzilla.opensuse.org/show_bug.cgi?id=1018791
2017-01-31 22:04:04 +01:00

17 lines
351 B
Bash
Executable File

#!/bin/bash
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
markerfile=/var/run/stopped-salt-minion-on-suspend
if [ "$1" = pre ] ; then
if systemctl is-active salt-minion ; then
systemctl stop salt-minion
echo 1 > $markerfile
fi
fi
if [ "$1" = post ] && [ -e $markerfile ] ; then
rm -f $markerfile
systemctl start salt-minion
fi