mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
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
This commit is contained in:
parent
2f532ff9f8
commit
c2cef98747
1 changed files with 16 additions and 0 deletions
16
pkg/salt-minion.sleep
Executable file
16
pkg/salt-minion.sleep
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/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
|
Loading…
Add table
Reference in a new issue