costalat

Linux, schedule restart - Criar um restart à hora desejada

Sep 8th, 2011
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. x = raw_input("Escolha a hora desejada para efectuar o restart(xx:xx)- ")
  2. openfile = open('/etc/rc.local', 'r+')
  3. openfile.seek(405)
  4. openfile.write('shutdown -r ')
  5. openfile.seek(417)
  6. openfile.write(x)
  7. openfile.close()
Advertisement
Add Comment
Please, Sign In to add comment