Advertisement
Guest User

Untitled

a guest
Dec 25th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. root@powerpi:~# cat
  2. # put in /lib/systemd/system/yourservice.service
  3. # and then
  4. # dont forget to:
  5. #
  6. # sudo systemctl daemon-reload # to reload changes to services and in particular yourservice.service
  7. # sudo systemctl enable yourservice # to enable yourservice.service at upstart
  8. # sudo systemctl start yourservice # to start yourservice.service
  9. #
  10. # systemd service below:
  11.  
  12. [Unit]
  13. Description=Your service to start a script after network.target
  14. Documentation=http://somesoftware.com/about
  15. After=network.target
  16.  
  17. [Service]
  18. Type=simple
  19. User=root
  20. WorkingDirectory=/path/to/your
  21. ExecStart=/bin/bash /path/to/your/script.sh
  22. Restart=no
  23.  
  24. [Install]
  25. WantedBy=multi-user.target
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement