Skip to content
Snippets Groups Projects
activate-user.sh 395 B
Newer Older
Michiel de Jong's avatar
Michiel de Jong committed
#!/bin/bash -eux

mkdir -p /data/per-user/$1/nginx/data
touch /data/per-user/$1/nginx/.env
if [ -e /data/per-user/$1/nginx/data/www-content ]; then
  cd /data/per-user/$1/nginx/data/www-content; git pull --rebase
Pierre Ozoux's avatar
Pierre Ozoux committed
# else
#   git clone $3 /data/per-user/$1/nginx/data/www-content
Michiel de Jong's avatar
Michiel de Jong committed
# Start service for new site (and create the user)
systemctl enable $2@$1.service
systemctl start  $2@$1.service