summaryrefslogtreecommitdiffstats
path: root/scripts/xds-docker-create-container.sh
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-10-12 17:37:36 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-10-12 23:36:10 +0200
commit5f67c1a72b982fc4057e2f6e4803324d3be1330a (patch)
treec556ad188d346b39b2b09c27a303bf439b828b1f /scripts/xds-docker-create-container.sh
parent15c8fccff456d5f148cff5bd8ecf34796f52e18a (diff)
xds-server is now start as user systemd service.
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'scripts/xds-docker-create-container.sh')
-rwxr-xr-x[-rw-r--r--]scripts/xds-docker-create-container.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/xds-docker-create-container.sh b/scripts/xds-docker-create-container.sh
index 13ebb71..e29d7ec 100644..100755
--- a/scripts/xds-docker-create-container.sh
+++ b/scripts/xds-docker-create-container.sh
@@ -166,20 +166,19 @@ echo " ssh -p $SSH_PORT $DOCKER_USER@localhost"
### User / Group id
if ($UPDATE_UID); then
echo "Setup docker user and group id to match yours"
- docker exec -t ${NAME} bash -c "systemctl stop xds-server" || exit 1
+ docker exec -t ${NAME} bash -c "systemctl --user stop xds-server" || exit 1
docker exec -t ${NAME} bash -c "usermod -u $(id -u) $DOCKER_USER && groupmod -g $(id -g) $DOCKER_USER" || exit 1
docker exec -t ${NAME} bash -c "chown -R $DOCKER_USER:$DOCKER_USER /home/$DOCKER_USER /tmp/xds*" || exit 1
- docker exec -t ${NAME} bash -c "systemctl start xds-server" || exit 1
- docker exec -t ${NAME} bash -c "systemctl start xds-server" || exit 1
+ docker exec -t ${NAME} bash -c "systemctl --user start xds-server" || exit 1
fi
### Force xds-server restart
if ($FORCE_RESTART); then
echo "Stopping xds-server..."
- docker exec -t ${NAME} bash -c "systemctl stop xds-server" || exit 1
+ docker exec -t ${NAME} bash -c "systemctl --user stop xds-server" || exit 1
sleep 1
echo "Starting xds-server..."
- docker exec -t ${NAME} bash -c "systemctl start xds-server" || exit 1
+ docker exec -t ${NAME} bash -c "systemctl --user start xds-server" || exit 1
fi
echo "Done, docker container $NAME is ready to be used."