Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: wysiwyg on February 21, 2015, 02:38:44 PM

Title: best way to start a service
Post by: wysiwyg on February 21, 2015, 02:38:44 PM
Good afternoon everyone!  I am trying to create an extension for 'at', but I can't figure out how to start the daemon as another user.  It appears that the 'atd' daemon needs to be run by a user called 'daemon'.  I tried doing:

sudo start-stop-daemon -u daemon -S -b -x /usr/local/sbin/atd

and then checking for an 'atd' running process - without success.  Any thoughts on getting this to work?  Am I over thinking this or missing something?

Thanks,
Dave
Title: Re: best way to start a service
Post by: gerald_clark on February 21, 2015, 02:41:23 PM
I suggest you check out other service scripts in /usr/local/etc/init.d.
Title: Re: best way to start a service
Post by: wysiwyg on February 21, 2015, 06:29:35 PM
The ones I have don't start with another user account.  Any other ideas?

Thanks,
Dave
Title: Re: best way to start a service
Post by: gerald_clark on February 21, 2015, 07:13:54 PM
su
Title: Re: best way to start a service
Post by: wysiwyg on February 22, 2015, 01:16:35 PM
Thanks for the continued help gerald_clark.  Are their any advantages to using 'su' over 'start-stop-daemon', or vice-versa?

Thanks,
Dave