Skip to content

Instantly share code, notes, and snippets.

@mostafahussein
Forked from UtahDave/custom_module.py
Created December 29, 2015 16:52
Show Gist options
  • Save mostafahussein/93188554c1ba055b65c0 to your computer and use it in GitHub Desktop.
Save mostafahussein/93188554c1ba055b65c0 to your computer and use it in GitHub Desktop.
Fire and Forget Salt module
from subprocess import Popen
def start_server():
cmd_str = 'sleep 60 && echo "hello!" >> /tmp/test.txt'
proc = Popen([cmd_str], shell=True,
stdin=None, stdout=None, stderr=None, close_fds=True)
return cmd_str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment