Skip to content

Instantly share code, notes, and snippets.

@magnetikonline
Last active August 5, 2024 14:13
Show Gist options
  • 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