On 2015-04-15 10:37:54, Matthijs Kooijman wrote:
> Hi Antoine,
>
>> > I just tried running willie, but it seems that the "restart" and "stop"
>> > actions of the init script are broken.
>> 
>> I don'T believe they are. I am using them here without problems.
> Interesting.
>
>> One thing with this package is that the config file is not automatically
>> configured right now, as explained in README.Debian. You need to run
>> those commands when you install the package:
>> 
>>     chown willie /etc/willie.cfg
>>     sudo -u willie willie --config /etc/willie --configure-all
>>     chown root /etc/willie.cfg
> Oh, I did indeed miss that. However, instead I modified DAEMON_ARGS
> through /etc/default/willie to point to a preconfigured willie.cfg
> living elsewhere, which I think should have the same effect.

What do you have in DAEMON_ARGS then?

> From looking at the code, I also believe that neither of none of this
> should actually prevent the problem from occuring: when running willie
> --quit, no --config option is passed, so the only place willie will look
> for a configuration is ~willie/.willie/default.cfg. I don't have that
> file, do you?

I don't.

> To double-check, I ran the above configuration commands (which write to
> /etc/willie.cfg as expected) and reverted my changes to the initscript.
> If I run the stop action, I still get willie complaining:
>
>       matthijs@login:~$ sudo invoke-rc.d  willie stop
>       Welcome to Willie!
>       I can't seem to find the configuration file, so let's generate it!
>
> Perhaps on your system, /var/lib/willie/.willie/default.cfg somehow got
> created, or perhaps willie's homedir isn't /var/lib/willie?

anarcat@marcos:~$ file ~willie/.willie/default.cfg
/var/lib/willie/.willie/default.cfg: cannot open 
`/var/lib/willie/.willie/default.cfg' (No such file or directory)

One thing that strikes me as a possibility is that I probably don't use
the init.d script at all here. I am running willie in a Jessie system
running systemd as PID 1. Furthermore, i use a slight modification of
the startup script:

--- /etc/systemd/system/willie.service  2015-02-05 20:37:38.979057233 -0500
+++ /lib/systemd/system/willie.service  2015-03-16 21:19:16.000000000 -0400
@@ -8,7 +8,8 @@
 User=willie
 PIDFile=/run/willie/willie-willie.pid
 ExecStart=/usr/bin/willie -c /etc/willie.cfg
-Restart=always
+Restart=on-failure
+RestartPreventExitStatus=2
 RestartSec=30

 [Install]

... but that shouldn't impact the bug you are seeing.

It is quite possible I messed up the less-tested init.d script, if you
have patches, I would gladly commit them!

a.

-- 
Nothing incites to money-crimes like great poverty or great wealth.
                        - Mark Twain


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to