Just a curiosity I came about looking at the nginx service file available in repos:
@ execute = (
foreground
{
        if
        { 
                if -nt { s6-test -d /run/nginx }
                s6-mkdir -p -m0755 /run/nginx
        }
        s6-chown -u nginx -g nginx /run/nginx
}
execl-cmdline -s { nginx ${CMD_ARGS} } )
Why do you chose foreground here? Skarnet says:
[...] an execline script that must run prog3... no matter the result of the test, use a foreground wrapper:
foreground { if { prog1... } prog2... } prog3...
soo,...in this case nginx would get fired even though the run directory didn't exist or had wrong owner/group? I don't know specifically for nginx yet but I'm looking into a similar case for mysqld and it seems to be the same regarding the requirements for the daemon. So even if the test blocks failed for whatever reason then the execl-cmdline would still get executed.
At least in the case of mysql that would throw errors.
No bug here or anything, just a comment out of curiosity.

Side Note:
Also s6-chown doesn't work with names, only IDs?
root@ obarun / # s6-chown -u mysql -g mysql /run/mysqld
s6-chown: usage: s6-chown [ -U ] [ -u uid ] [ -g gid ] file
Follow Up:
I did a very similar mysqld service and it works as expected with just basic instructions:
@ execute = (
if {
        if { mkdir -p /run/mysqld }
        chown -R mysql:mysql /run/mysqld
}
execl-cmdline -s { mysqld_safe ${CMD_ARGS} } )

[environment]
!CMD_ARGS=--user=mysql --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid  --socket=/var/run/mysqld/mysqld.sock --port=3306
P.S.: Maybe you could add this as mysqld-66serv to the repos since it's missing.
yeah this service seem not correct, need to be rectified, thanks.
Tricks: you can use foreground (usefull when you need to make a "group" of command) and know if the foreground block did well
foreground 
{
 if { prog1 }
 if { prog2 }
 ...
}
importas ? ?
s6-test $? -le 1
...
obviously you can use any command that you want to check the '?' variable value. Refer to foreground doc : https://skarnet.org/software/execline/foreground.html like you did to understand the possible contain of '?' variable

EDIT: arff, i was surprise about the contain of the service, the package wasn't rebuild (grrrrrr), the good one is here https://framagit.org/obarun-pkgbuild-66service/nginx-66serv/blob/master/nginx
By the way , i will update the package :p

EDIT:done
Hi

By the way the service is wrong. I was working on this few weeks ago, but I didn't finished my work since I'm now very busy for my school exams, during this time there was a little too much precipitation to move on a new server and I can not finish my test until I build a local VM with my backup and test it again.

So, nginx master process must be run as root , and only childs are run with nginx uid. It's done automaticaly when you start nginx, That mean 's6-setuidgid nginx' is wrong. ( That's why I did not build the package right now, until I'm sure that everything is ok ). All others pkgbuild server services I built are in the same testing state, be careful.

Thx
Two very appreciated comments. Thank you! Funny enough the "testing-state" services work well enough for a basic execution. (Actually I won't vouch for this comment, as I used the above mentioned services and they differ from what you've got on framagit ;) Thanks for the insight on your work. I'm so looking forward to all this development going on.

Powered by Obarun