> Hi,
Hi again,
> Result of my basic tests:
> 
> Update with existing /var/www/html/index.cgi works as expected 
> (index.cgi as default page).
> 
> Install with existing /var/www/html/index.cgi works as expected 
> (index.cgi as default page).
> 
> Install without /var/www/ works as expected (index.html copied, and
> as 
> default page).
> 
> Install with empty /var/www/html/ works as expected (index.html
> copied, 
> and as default page).
> 
> 
> Testing error behaviour:
> 
>      rm -rf /var/www
> 
>      touch /var/www
> 
>      chmod 000 /var/www
> 
>      apt install /tmp/mini-httpd_1.30-8_amd64.deb
> 
> Fails as expected:
> 
>      Setting up mini-httpd (1.30-8) ...
>      mkdir: cannot create directory ‘/var/www’: Not a directory
>      dpkg: error processing package mini-httpd (--configure):
>       installed mini-httpd package post-installation script
> subprocess 
> returned error exit status 1
>      Processing triggers for man-db (2.12.0-3) ...
>      Errors were encountered while processing:
>       mini-httpd
>      E: Sub-process /usr/bin/dpkg returned an error code (1)
> 
> postinst checks look sane.
> 
Thanks a lot for your help ! You've sped up this release tremendously
by helping me with testing !
> 
> But while testing, I found an odd little detail:
> 
> mini_httpd is invoked with a repeated -C /etc/mini-httpd.conf, or at 
> least that is what systemd reports.

You're right, I missed that one ! Although you're right, httpd does not
care about duplicated -C call now, it might in the future if getopts in
mini_httpd.c change. It's clearly a bug I missed when I created the
systemd service from scratch. This:
git diff debian/mini-httpd.service
diff --git a/debian/mini-httpd.service b/debian/mini-httpd.service
index 577b72a..916ae65 100644
--- a/debian/mini-httpd.service
+++ b/debian/mini-httpd.service
@@ -6,7 +6,7 @@ After=network.target
 Type=forking
 PIDFile=/run/mini_httpd.pid
 EnvironmentFile=-/etc/default/mini-httpd
-ExecStart=/usr/sbin/mini_httpd -C /etc/mini-httpd.conf $DAEMON_OPTS -i
/run/mini_httpd.pid
+ExecStart=/usr/sbin/mini_httpd $DAEMON_OPTS -i /run/mini_httpd.pid
 
 [Install]
 WantedBy=multi-user.target

fixes it entirely.

On this note, I'm getting close to releasing 1.30-8, this systemd
little fix pushes these changes into "quite important enough to push
into a new release" land.

Thanks for all your help !
You'll automatically get a mail when I push, as your Bug report will
automatically close.

Have a great one,
Alexandru Mihail

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

Reply via email to