From 4d2c48129fc14af2cf8c92e102fefeff1390ea7b Mon Sep 17 00:00:00 2001 From: ronivay Date: Tue, 29 Aug 2017 19:16:07 +0300 Subject: [PATCH] Add WorkingDirectory parameter to systemd config and comments --- xo-install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xo-install.sh b/xo-install.sh index 414527d..4042203 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -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