You are not logged in.
Hi all.
Noob here, so please be gentle ![]()
I want to run a shell script to make my box connect to a wireless network.
The script uses ip and wpa_supplicant.
What's the right way to do this?
I read this section :autostarting
but I am not sure as to what is the best practice here.
I want it to be executed at boot time because I need to ssh into this box to control it, so I cannot just put it in /etc/profile.d and wait for a shell login to execute it.
So I thought a systemd service would be the way to go, but I am not sure about which unit type would suite be the right one: probably OneShot, or maybe idle.
By the way, being run at boot time, how does it handle the fact that it runs ip and wpa_supplicant? are they already available at boot time? are ip and wpa_supplicant relying on other services to be enabled first?
Lastly, are Cron or systemd Timers better alternatives?
I tried researching this by myself but the amount of possibilities is kind of confusing.
Cheers!
g.g
Offline
Why not just use systemd-networkd and the wpa_supplicant@ service to handle setting up your network?
No need to write your own service files as everything you need is already installed.
Last edited by Slithery (2017-01-02 15:34:30)
Offline