X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=etc%2Fsv%2Ffcgi.80.git.heureux-cyclage.org%2Fconfigure;h=ee22ebab756f5f4ef8bb09915033f562dfb38280;hp=c01e6d0aed7cbcbe80f4b9619646b588e0125a84;hb=c66bfacc6bac1bcb030675983107e4b90b08029b;hpb=dae8fe647e7f10f8578a9bd6b64122df1b3f4e88 diff --git a/etc/sv/fcgi.80.git.heureux-cyclage.org/configure b/etc/sv/fcgi.80.git.heureux-cyclage.org/configure index c01e6d0..ee22eba 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")" && 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"