WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: best way to start a service  (Read 2062 times)

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
best way to start a service
« on: February 21, 2015, 05: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

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: best way to start a service
« Reply #1 on: February 21, 2015, 05:41:23 PM »
I suggest you check out other service scripts in /usr/local/etc/init.d.

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: best way to start a service
« Reply #2 on: February 21, 2015, 09:29:35 PM »
The ones I have don't start with another user account.  Any other ideas?

Thanks,
Dave

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: best way to start a service
« Reply #3 on: February 21, 2015, 10:13:54 PM »
su

Offline wysiwyg

  • Sr. Member
  • ****
  • Posts: 266
Re: best way to start a service
« Reply #4 on: February 22, 2015, 04: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