Merge pull request #2 from tssva/master

A couple of small fixes
This commit is contained in:
Roni Väyrynen
2018-04-13 18:15:07 +03:00
committed by GitHub

View File

@@ -14,7 +14,7 @@ function CheckUser {
# Make sure the script is ran as root # Make sure the script is ran as root
if [[ ! $(whoami) == "root" ]]; then if [[ ! "$(id -u)" == "0" ]]; then
echo "This script needs to be ran as root" echo "This script needs to be ran as root"
exit 0 exit 0
fi fi
@@ -170,7 +170,7 @@ function InstallXO {
sed -i "s#ExecStart=.*#ExecStart=$INSTALLDIR\/xo-server\/bin\/xo-server#" $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server/xo-server.service sed -i "s#ExecStart=.*#ExecStart=$INSTALLDIR\/xo-server\/bin\/xo-server#" $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server/xo-server.service
echo echo
echo "Adding WorkingDirectory parameter to systemd service configuration" echo "Adding WorkingDirectory parameter to systemd service configuration"
sed -i "/ExecStart=.*/a WorkingDirectory=/etc/xo/xo-server" $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server/xo-server.service sed -i "/ExecStart=.*/a WorkingDirectory=$INSTALLDIR/xo-server" $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server/xo-server.service
if [ $XOUSER ]; then if [ $XOUSER ]; then
echo "Adding user to systemd config" echo "Adding user to systemd config"