X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=etc%2Fsv%2Ffcgi.80.git.heureux-cyclage.org%2Fconfigure;h=23bd42e488baa6373b2593251de4e6ce4d94765a;hb=e80dbf50a89c0b84174e566b85af9593410becfb;hp=c01e6d0aed7cbcbe80f4b9619646b588e0125a84;hpb=11ad3e26a495747801c9290a1fb7b4537d123ae0;p=lhc%2Fateliers.git diff --git a/etc/sv/fcgi.80.git.heureux-cyclage.org/configure b/etc/sv/fcgi.80.git.heureux-cyclage.org/configure index c01e6d0..23bd42e 100755 --- a/etc/sv/fcgi.80.git.heureux-cyclage.org/configure +++ b/etc/sv/fcgi.80.git.heureux-cyclage.org/configure @@ -1,11 +1,15 @@ #!/bin/sh -efux -run_user=fcgi.80.git.heureux-cyclage.org -id "$run_user" >/dev/null || +sv=$(basename "$(cd "$(dirname "$0")" && pwd)") +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"