mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Salt minion dies with a ctrl-c now
This commit is contained in:
parent
4941952b97
commit
f069cc5fd1
1 changed files with 8 additions and 3 deletions
|
@ -1,15 +1,20 @@
|
|||
#!/usr/bin/env python2
|
||||
#!/usr/bin/python2
|
||||
'''
|
||||
This script is used to kick off a
|
||||
'''
|
||||
import salt
|
||||
import os
|
||||
|
||||
def main():
|
||||
'''
|
||||
The main function
|
||||
'''
|
||||
minion = salt.Minion()
|
||||
minion.start()
|
||||
pid = os.getpid()
|
||||
try:
|
||||
minion = salt.Minion()
|
||||
minion.start()
|
||||
except KeyboardInterrupt:
|
||||
os.kill(pid, 15)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Add table
Reference in a new issue