On Jun 9, 2010, at 4:27 PM, Aristoteles Neto wrote:

> On 9/06/2010 22:02, Mark Edwards wrote:
>> I saw that, but afterwards Aristoteles suggested using sudo, so I thought 
>> perhaps there was a way to achieve it.
>> 
>> So am I correct that the choice is between:
>> 
>> 1) Running ASSP as root, not running as a service, and being able to restart 
>> itself
>> 
>> 2) Running ASSP as non-root user, running as a service, and not being able 
>> to restart itsel
> 
> I've just tested the following on version 1.7.5.1(1.0.08):
> 
> AsAService:=
> AsADaemon:=
> runAsUser:=nobody
> runAsGroup:=nogroup
> AutoRestart:=1
> AutoRestartCmd:=sudo /etc/init.d/assp restart
> AutoRestartAfterCodeChange:=
> 
> Then sudoers has:
> nobody ALL=(ALL) NOPASSWD: /etc/init.d/assp

Aha, my problem was not having AutoRestart on.  It wasn't clear to me from the 
gui that it is necessary to have this on in order for the Shutdown/Restart 
function to work.

THANKS!

> Since I do not use Service or Daemon (I also don't use autorestart) 
> Fritz's comment is probably correct that if it runs as a service or 
> daemon, this wont work.

I only had it running as a daemon because I thought that was necessary to run 
as a non-root user.  I think I got that impression from some random Howto, but 
its false so I'm all set now.

> I can also see a problem with busier installations which will depend on 
> the init script you use. The one in the wiki will send a kill command 
> and start it back up straight away, which may mean that the ports may 
> have not yet been released by the process you just killed and thus the 
> new process wont be able to bind to them.

For this reason I am using:

AutoRestartCmd:=sudo /etc/init.d/assp start

This will only start the ASSP, not issue any kill commands.  Seems to work 
fine, and is more in line with the suggested command in the gui.

Thanks very much to everyone for help on this.
 
--
Mark Edwards
Audiovisual Coordinator & IT Assistant
Contemporary Jewish Museum
736 Mission Street
San Francisco, CA  94103
 
direct line: 415.655.7802
fax: 415.655.7815


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Assp-user mailing list
Assp-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/assp-user

Reply via email to