aboutsummaryrefslogtreecommitdiffstats
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
parent15c8fccff456d5f148cff5bd8ecf34796f52e18a (diff)
xds-server is now start as user systemd service.
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
-rw-r--r--conf.d/etc/default/xds-server4
-rwxr-xr-x[-rw-r--r--]scripts/xds-docker-create-container.sh9
2 files changed, 6 insertions, 7 deletions
diff --git a/conf.d/etc/default/xds-server b/conf.d/etc/default/xds-server
index 0818638..0c82849 100644
--- a/conf.d/etc/default/xds-server
+++ b/conf.d/etc/default/xds-server
@@ -1,8 +1,8 @@
# defaults file for XDS Server
-# this file is used for service environment in /lib/systemd/system/xds-server.service
+# this file is used for service environment in /usr/lib/systemd/user/xds-server.service
# JSON config file to use
-APP_CONFIG=/home/devel/.config/xds/server/config.json
+#APP_CONFIG=${HOME}/.config/xds/server/config.json
# Logging level (supported levels: panic, fatal, error, warn, info, debug)
LOG_LEVEL=info
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."