this post was submitted on 17 May 2025
8 points (83.3% liked)
Arch Linux
8753 readers
1 users here now
The beloved lightweight distro
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Create a systemd user unit that waits for the network-online.target.
A script something like:
Edit the template according to your needs and dump it into
~/.local/share/systemd/user/<unit>.service
and enable it withsystemctl --user enable --now <unit>
What's the difference between oneshot and simple?
Oneshot services are for things like scripts that do a thing and exit. Simple is for basic services that intend to run for the lifetime of the system (or for user units, the lifetime of the user's session).
Ahh ok. Since in this case the script should only run at start and then exit, I use oneshot. Many thx.