From 0a380e0d1610da585323f4e8bf3999fde48d883d Mon Sep 17 00:00:00 2001 From: Stephane Desneux Date: Thu, 1 Jun 2017 22:52:01 +0200 Subject: xds: add startup service for XDS Server Signed-off-by: Stephane Desneux --- INSTALL/tasks.d/80_xds | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'INSTALL/tasks.d/80_xds') 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 <$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 </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 -- cgit