+++ /dev/null
-local run_user="$user"-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
+exec 2>&1
+run_user=spawn-fcgi.80.git.heureux-cyclage.org
+sock_user=www-data
+exec /usr/bin/spawn-fcgi
+ -g "$run_user" \
+ -G "$sock_user" \
+ -M 0660 \
+ -n \
+ -s /run/nginx/fastcgi/spawn-fcgi.80.git.heureux-cyclage.org \
+ -u "$run_user" \
+ -U "$sock_user" \
+ -- /usr/bin/multiwatch \
+ --forks 10 \
+ -- /usr/sbin/fcgiwrap
+++ /dev/null
-#!/bin/sh -efux
-exec 2>&1
-run_user=git-spawn-fcgi-80
-sock_user=www-data
-exec /usr/bin/spawn-fcgi
- -g "$run_user" \
- -G "$sock_user" \
- -M 0660 \
- -n \
- -s /run/nginx/fastcgi/spawn-fcgi.git.80.git.heureux-cyclage.org \
- -u "$run_user" \
- -U "$sock_user" \
- -- /usr/bin/multiwatch \
- --forks 10 \
- -- /usr/sbin/fcgiwrap
# Xen hypervisor console
hvc:2345:respawn:/sbin/getty 38400 hvc0
#xvc:2345:respawn:/sbin/getty 38400 xvc0
+
+ #-- runit begin
+ SV:123456:respawn:/usr/sbin/runsvdir-start
+ #-- runit end
EOF
sudo install -m 644 -o root -g root /dev/stdin /etc/login.defs <<-EOF
MAIL_DIR /var/mail
"$tool"/etc/skel/etc/mail/delivery.procmailrc \
/etc/skel/etc/mail/delivery.procmailrc
}
+rule_runit_configure () {
+ rule apt_get_install runit
+ local -; set +f
+ rm -f /etc/service/*
+ # NOTE: runsvdir éteindra les services qui n'apparaîtront plus ici.
+ for sv in "$tool"/etc/sv/*
+ do sv=${sv#"$tool"/etc/sv/}
+ sudo install -d -m 770 -o root -g root \
+ /etc/sv/"$sv"
+ sudo install -m 770 -o root -g root \
+ "$tool"/etc/sv/"$sv"/run \
+ /etc/sv/"$sv"/run
+ if test -e "$tool"/etc/sv/"$sv"/log/run
+ then
+ sudo install -d -m 770 -o root -g root \
+ /etc/sv/"$sv"/log
+ sudo install -m 770 -o root -g root \
+ "$tool"/etc/sv/"$sv"/log/run \
+ /etc/sv/"$sv"/log/run
+ fi
+ if test ! -x "$tool"/etc/sv/"$sv"/configure ||
+ "$tool"/etc/sv/"$sv"/configure
+ then
+ ln -fns ../sv/"$sv" /etc/service/"$sv"
+ sv restart "$sv"
+ else
+ done
+ }
rule_ssh_configure () {
ssh-keygen -F "$vm_fqdn" -f "$tool"/etc/openssh/known_hosts |
( while IFS= read -r line
rule nginx_configure
rule php5_fpm_configure
rule gitolite_configure
+ rule runit_configure
}
rule_luks_key_change () {