init.d/srv update script
The srv.init script doesn't implement
- restart
- reload
- status
according to expectation. They just return true
(or 0
for status).
Expected behaviour:
To restart the service. This is probably as simple as stop, start. The same for reload (like here eg: https://openwrt.org/docs/guide-developer/procd-init-scripts?s=procd_set_param%20respawn#forcing_service_restart) For status, I don't know what I would expect (didn't matter that much to me)
background story
Due to a power failure, my drives were only powered on after my Turris MOX was already operational.
Since I think the /srv mounting is only handled by this init script (and preferably should not be done by trying something else), I tried /etc/init.d/srv restart
.
This didn't change anything, which left me wondering.
After a while (and inspecting the code), using /etc/init.d/srv stop
and /etc/init.d/srv start
, everything was fine again.
I'm not well versed in init scripts, so I'll leave the decision of the best way to you, but I guess the minimum would be:
restart() {
stop
start
}
reload() {
echo "Explicitly restarting service"
restart
}