Skip to content

Instantly share code, notes, and snippets.

@salerno-rafael
Created July 23, 2018 21:00
Show Gist options
  • Select an option

  • Save salerno-rafael/70ac73f8196fbb7056ac81dd03c86dfd to your computer and use it in GitHub Desktop.

Select an option

Save salerno-rafael/70ac73f8196fbb7056ac81dd03c86dfd to your computer and use it in GitHub Desktop.
  1. Put the script commands you wish to run in /usr/bin/myscript (this is a service path)
  2. Make the script executable with chmod +x
  3. Create service file /usr/lib/systemd/system/my.service
  4. add the info below in file

[Unit] Description=To change In test buffer After=network.target

[Service] Type=simple ExecStart=/usr/local/bin/myshell.sh TimeoutStartSec=0

[Install] WantedBy=default.target

  1. Reload the systemd service files: systemctl daemon-reload
  2. Check that it is working with systemctl start my
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment