Add WorkingDirectory parameter to systemd config and comments

This commit is contained in:
ronivay
2017-08-29 19:16:07 +03:00
parent 716e64bcc3
commit 4d2c48129f

View File

@@ -165,6 +165,8 @@ function InstallXO {
echo "done"
echo
echo "xo-server and xo-web build quite a while. Grab a cup of coffee and lay back"
echo
echo -n "Running xo-server install..."
cd $INSTALLDIR/xo-builds/xo-server-$TIME && yarn > /dev/null 2>$LOGFILE && yarn run build > /dev/null 2>$LOGFILE
echo "done"
@@ -176,6 +178,10 @@ function InstallXO {
echo "Fixing binary path in systemd service configuration and symlinking to /etc/systemd/system/xo-server.service"
sed -i "s#ExecStart=.*#ExecStart=$INSTALLDIR\/xo-server\/bin\/xo-server#" $INSTALLDIR/xo-builds/xo-server-$TIME/xo-server.service
echo
echo "Adding WorkingDirectory parameter to systemd service configuration"
sed -i "/ExecStart=.*/a WorkingDirectory=/etc/xo/xo-server" $INSTALLDIR/xo-builds/xo-server-$TIME/xo-server.service
if [ $XOUSER ]; then
echo "Adding user to systemd config"
sed -i "/SyslogIdentifier=.*/a User=$XOUSER" $INSTALLDIR/xo-builds/xo-server-$TIME/xo-server.service