Skip to content

Instantly share code, notes, and snippets.

@chirag64
Last active August 29, 2015 13:56
Show Gist options
  • Save chirag64/9310958 to your computer and use it in GitHub Desktop.
Save chirag64/9310958 to your computer and use it in GitHub Desktop.
  • Go to /etc/systemd/system/

cd /etc/systemd/system

  • Create a new text file with .service extension and edit it

sudo touch myservice.service

  • Enter the barebones essential syntax into the file using your favorite text editor
[Unit]
Description=Description of myservice

[Service]
ExecStart=/path/to/shell/file


[Install]
WantedBy=multi-user.target
  • Enable the newly created service using systemctl

sudo systemctl enable myservice.service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment