On August 22, 2013 03:27:56 PM Timur Birsh wrote:
> On Wed, Aug 21, 2013 at 23:25 -0500, Steve M. Robbins wrote:
> > root@riemann{~}ls -la /run/inadyn
> > ls: cannot access /run/inadyn: No such file or directory
> > root@riemann{~}ls -la /var/log/inadyn
> > total 16
> > drwxr-xr-x  2 debian-inadyn debian-inadyn  4096 Aug 10 10:08 .
> > drwxr-xr-x 27 root          root          12288 Aug 21 23:09 ..
> > root@riemann{~}ls -l /etc/inadyn.conf
> > -rw-r----- 1 root debian-inadyn 787 Aug  9 02:24 /etc/inadyn.conf
> 
> As I can see, postinst script ran ok: log dir and config have correct owner.
> > I edited /et/default/inadyn, and /etc/inadyn.conf, then:
> > 
> > root@riemann{~}/etc/init.d/inadyn restart
> 
> Why 'restart'? :) 'start' command in init script has create_cache_dir()
> call, which creates /run/inadyn dir. So, if you invoke init script with
> 'start' command, it will create run dir with the correct owner.

Habit.  I generally assume "restart" == "stop" + "start", and therefore that
"restart" is the same as "start" if the daemon is not running.

 
> Perhaps I should put create_cache_dir() call in 'restart' command.

Perhaps you can code it so that "restart" just calls "stop" and then "start"?
That seems to be a fairly common idiom.

-Steve

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to