Skip to content

Instantly share code, notes, and snippets.

@magnetikonline
Last active January 17, 2024 09:29
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save magnetikonline/29263ceed7cd8cee2861b26fb04332da to your computer and use it in GitHub Desktop.
Save magnetikonline/29263ceed7cd8cee2861b26fb04332da to your computer and use it in GitHub Desktop.
Creating a 'run once' systemd unit.
[Unit]
Description=Run once
After=local-fs.target
After=network.target
#After=XXX
[Service]
ExecStart=/path/to/run/once/script.sh
RemainAfterExit=true
Type=oneshot
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment