Skip to content

Instantly share code, notes, and snippets.

@pvgomes
Last active October 9, 2017 20:26
Show Gist options
  • Save pvgomes/c680de4e69955d4f6597ad57607d83cb to your computer and use it in GitHub Desktop.
Save pvgomes/c680de4e69955d4f6597ad57607d83cb to your computer and use it in GitHub Desktop.
restartPy
import os
import time
quantity = int(input("Quantity to restart: "))
while(quantity > 0):
print("Runnint restart %s" % (str(quantity)))
time.sleep(3)
os.system("initctl restart worker");
quantity = quantity - 1
print("Finish")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment