From bded377c9aab67f1a2c8ac43d1af417d9646c920 Mon Sep 17 00:00:00 2001 From: Mafoo Date: Sat, 11 Jun 2016 15:50:10 +0100 Subject: [PATCH] BugFix-make relative paths work (#19) remove path on systemctl as it should rely on path as it could be in /sbib/ on some systems --- debian/install.sh | 15 +++++++++------ debian/resources/postgres.sh | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/debian/install.sh b/debian/install.sh index 64d233b..a9ada96 100755 --- a/debian/install.sh +++ b/debian/install.sh @@ -40,6 +40,9 @@ sed -i '/cdrom:/d' /etc/apt/sources.list echo "Update Debian" apt-get upgrade && apt-get update -y --force-yes +#move to script directory so all relative paths work +cd "$(dirname "$0")" + #IPTables resources/iptables.sh @@ -84,12 +87,12 @@ resources/postgres.sh server_address=$(hostname -I) #restart services -/bin/systemctl daemon-reload -/bin/systemctl try-restart freeswitch -/bin/systemctl daemon-reload -/bin/systemctl restart php5-fpm -/bin/systemctl restart nginx -/bin/systemctl restart fail2ban +systemctl daemon-reload +systemctl try-restart freeswitch +systemctl daemon-reload +systemctl restart php5-fpm +systemctl restart nginx +systemctl restart fail2ban #Show database password echo "Complete the install by by going to the IP address of this server "; diff --git a/debian/resources/postgres.sh b/debian/resources/postgres.sh index 33c20ba..73d4362 100755 --- a/debian/resources/postgres.sh +++ b/debian/resources/postgres.sh @@ -19,8 +19,8 @@ apt-get install -y --force-yes sudo postgresql #apt-get install -y --force-yes sudo postgresql-bdr-9.4 postgresql-bdr-9.4-bdr-plugin postgresql-bdr-contrib-9.4 #systemd -/bin/systemctl daemon-reload -/bin/systemctl restart postgresql +systemctl daemon-reload +systemctl restart postgresql #init.d #/usr/sbin/service postgresql restart