-
Notifications
You must be signed in to change notification settings - Fork 0
Systemctl Utils
Lean's edited this page Jan 29, 2026
·
4 revisions
- sudo vim /etc/systemd/system/myscript.service/
[Unit]
Description=This will run after Boot
[Service]
Type=simple
ExecStart=program/location
[Install]
WantedBy=multi-user.target
- systemctl enable myscript.service
- sudo vim /etc/systemd/system/customscript.service
[Unit]
Description=My custom script
[Service]
Type=oneshot
ExecStart=/usr/local/bin/custom_script.sh
- sudo vim /etc/systemd/system/mytimer.timer
[Unit]
Description=My custom timer that will exec all tuesday 8 pm
[Timer]
OnCalendar=Tue 20:00:00
Persistent=true
[Install]
WantedBy=timers.target
- sudo systemctl enable --now mytimer.timer