Auto run user service on boot without login
by keeneadt from LinuxQuestions.org on (#4ZWK7)
Hi everybody. Newbie is here. I recently switched to Slackware on my Intel NUC. This little PC serves me as 24/7 uptime syncthing client and backup storage. So it's really important for me to have it constantly turned on with syncthing service running. Sometimes electricity problems appear. My UPS has only ~5 min battery charge (it's quite new). In such cases NUC turns off due to lack of power. Anyway i have a little trick how to turn it on remotely (my family), but in this case i get running NUC without syncthing service. As far as i know run syncthing as root is not a right thing. It has write permissions and things can go bad. I'm wondering is there any way to run user service that starts on boot without user login? I found some info about runuser and test it a little
Code:/usr/sbin/runuser --user=unprivileged syncthing -no-browser -logfile /home/unprivileged/.config/syncthing/syncthing.log I'm going to put this command to /etc/rc.d/rc.local. Still i have some doubts about if i'm doing it correctly. I know that systemd has some sort of implementations of user services that run on boot without user login. Do we have something similar in Slackware?


Code:/usr/sbin/runuser --user=unprivileged syncthing -no-browser -logfile /home/unprivileged/.config/syncthing/syncthing.log I'm going to put this command to /etc/rc.d/rc.local. Still i have some doubts about if i'm doing it correctly. I know that systemd has some sort of implementations of user services that run on boot without user login. Do we have something similar in Slackware?