1
0

salt-minion.sleep 351 B

12345678910111213141516
  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
  4. markerfile=/var/run/stopped-salt-minion-on-suspend
  5. if [ "$1" = pre ] ; then
  6. if systemctl is-active salt-minion ; then
  7. systemctl stop salt-minion
  8. echo 1 > $markerfile
  9. fi
  10. fi
  11. if [ "$1" = post ] && [ -e $markerfile ] ; then
  12. rm -f $markerfile
  13. systemctl start salt-minion
  14. fi