#!/bin/sh -efux
-run_user=fcgi.80.git.heureux-cyclage.org
-id "$run_user" >/dev/null ||
+sv=$(basename "$(cd "$(dirname "$0")" && cd -)")
+IFS=. read -r service site <<-EOF
+ $sv
+ EOF
+user=$sv
+getent passwd "$user" >/dev/null ||
sudo adduser \
--disabled-login \
--disabled-password \
--group \
- --home /no-home \
+ --home /home/www/pub/"$site" \
--shell /bin/false \
--system \
- "$run_user"
+ "$user"
#!/bin/sh -efux
exec 2>&1
-run_user=fcgi.80.git.heureux-cyclage.org
+sv=$(basename "$(cd "$(dirname "$0")" && cd -)")
+IFS=. read -r service site <<-EOF
+ $sv
+ EOF
+run_user=$sv
sock_user=www-data
exec /usr/bin/spawn-fcgi \
-g "$run_user" \
+++ /dev/null
-#!/bin/sh -efux
-run_user=git-daemon
-id "$run_user" >/dev/null ||
-sudo adduser \
- --disabled-login \
- --disabled-password \
- --group \
- --home /home/git/pub \
- --shell /bin/false \
- --system \
- "$run_user"
-log_user=git-daemon-log
-id "$log_user" >/dev/null ||
-sudo adduser \
- --disabled-login \
- --disabled-password \
- --group \
- --home /home/git/log/git-daemon \
- --shell /bin/false \
- --system \
- "$log_user"
+++ /dev/null
-#!/bin/sh -efux
-install -d -m 770 -o log.git-daemon -g log.git-daemon /home/git/log/git-daemon/
-exec chpst -u log.git-daemon svlogd -tt /home/git/log/git-daemon/
+++ /dev/null
-#!/bin/sh -efux
-exec 2>&1
-exec /usr/bin/chpst \
- -u git-daemon:git-daemon \
- /usr/bin/git daemon \
- --base-path=/home/git/pub/git \
- --interpolated-path=/home/git/srv/git/%H%D \
- --reuseaddr \
- --syslog \
- --user-path=pub/git \
- --verbose \
- -- \
- /home/git/pub/git
--- /dev/null
+#!/bin/sh -efux
+user=git-daemon
+getent passwd "$user" >/dev/null ||
+sudo adduser \
+ --disabled-login \
+ --disabled-password \
+ --group \
+ --home /home/git/pub \
+ --shell /bin/false \
+ --system \
+ "$user"
+getent passwd log."$user" >/dev/null ||
+sudo adduser \
+ --disabled-login \
+ --disabled-password \
+ --group \
+ --home /home/git/log/git-daemon \
+ --shell /bin/false \
+ --system \
+ log."$user"
--- /dev/null
+#!/bin/sh -efux
+user=git-daemon
+install -d -m 770 -o log."$user" -g log."$user" /home/git/log/git-daemon/
+exec chpst -u log."$user" svlogd -tt /home/git/log/git-daemon/
--- /dev/null
+#!/bin/sh -efux
+exec 2>&1
+exec /usr/bin/chpst \
+ -u git-daemon:git-daemon \
+ /usr/bin/git daemon \
+ --base-path=/home/git/pub/git \
+ --interpolated-path=/home/git/srv/git/%H%D \
+ --reuseaddr \
+ --syslog \
+ --user-path=pub/git \
+ --verbose \
+ -- \
+ /home/git/pub/git
/usr/sbin/mysqld \
--basedir=/usr \
--datadir=/home/mysql \
- --plugin-dir=/usr/lib/mysql/plugin \
- --user=mysql \
--pid-file=/var/run/mysqld/mysqld.pid \
+ --plugin-dir=/usr/lib/mysql/plugin \
+ --port=3306 \
--socket=/var/run/mysqld/mysqld.sock \
- --port=3306
+ --user=mysql