r/PeppermintOS•
unix21311

Using the Devaun edition, configuring sysvinit how to get it to auto start?

Currently inside /etc/init.d there is a script called test which has nothing more than this:

#! /bin/sh

echo "Testiing" >> /home/test/Desktop/test.txt

exit 0

(test is my current username.)

So if I run service test start it executes successfully. However it runs as root. Is there a way I can run this as the test user?

Now the next thing is how do I get it to autostart upon startup? I believe there is some run level I have to configure, so I believe I have to configure at run level 5 which would get executed at /etc/rc5.d.

I then ran this sudo update-rc.d test defaults. The output I get from this is:

insserv: warning: script 'test' missing LSB tags
insserv: warning: script 'test' missing LSB tags
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `test'
insserv: Default-Stop  undefined, assuming empty stop runlevel(s) for script `test'

and it doesn't appear in /etc/rc5.d.

Not too sure what I should do to fix this?

Posted Sep 18, 2022, 12:16 PM UTC

23
Loading comments…