diff options
author | 2017-06-01 22:52:01 +0200 | |
---|---|---|
committer | 2017-06-01 23:26:09 +0200 | |
commit | 0a380e0d1610da585323f4e8bf3999fde48d883d (patch) | |
tree | 87db5dd8ad5aff3557652d4cb0457d463abe3af7 | |
parent | f7a32abb46f72d2fe124f0a3c1f2d69b9b8f93ae (diff) |
xds: add startup service for XDS Server
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
-rw-r--r-- | INSTALL/tasks.d/80_xds | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/INSTALL/tasks.d/80_xds b/INSTALL/tasks.d/80_xds index f433495..7f3ffe3 100644 --- a/INSTALL/tasks.d/80_xds +++ b/INSTALL/tasks.d/80_xds @@ -36,6 +36,32 @@ EOF # Change owner of created files chown -R ${DEVUSER}:${DEVUSER_UID} ${XDS_CONFDIR} +# generate service file for startup +SERVFILE=/lib/systemd/system/xds-server.service +cat <<EOF >$SERVFILE +[Unit] +Description=XDS Server + +[Service] +User=${DEVUSER} +Type=forking +EnvironmentFile=-/etc/default/xds-server +ExecStart=/usr/local/bin/xds-server-start.sh + +[Install] +WantedBy=multi-user.target +EOF + +# config file +cat <<EOF >/etc/default/xds-server +# defaults file for XDS Server +# this file is used for service environment in $SERVFILE + +# no variable defined yet +EOF + +# install service +ln -s $SERVFILE /etc/systemd/system/multi-user.target.wants/ # cleanup (remove build tools) cd $curdir |