compose-website/scripts/activate-user.sh

19 lines
479 B
Bash
Raw Normal View History

2014-10-07 07:42:50 +00:00
#!/bin/bash -eux
2014-10-28 07:42:53 +00:00
if [ $# -ge 2 ]; then
DOMAIN=$1
IMAGE=$2
else
echo "Usage: sh /data/indiehosters/scripts/activate-user.sh domain image [gitrepo]"
2014-10-28 07:42:53 +00:00
exit 1
fi
mkdir -p /data/per-user/$DOMAIN/$IMAGE/data
2014-10-28 07:42:53 +00:00
if [ $# -ge 3 ]; then
GITREPO=$3
2014-10-29 15:32:18 +00:00
echo $GITREPO > /data/per-user/$DOMAIN/$IMAGE/data/GITURL
2014-10-28 07:42:53 +00:00
fi
2014-10-17 14:34:28 +00:00
2014-10-28 07:42:53 +00:00
# Start service for new site (and create the user). This will also enable the git puller.
systemctl enable $IMAGE@$DOMAIN.service
systemctl start $IMAGE@$DOMAIN.service