From b0baf0199e56861e96872425db9b476f1d015555 Mon Sep 17 00:00:00 2001 From: Giuseppe Attardi <giuseppe.attardi@garr.it> Date: Fri, 19 Jan 2018 11:26:24 +0100 Subject: [PATCH] Update install --- hooks/install | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hooks/install b/hooks/install index 0f129e6..fc11be1 100644 --- a/hooks/install +++ b/hooks/install @@ -1,9 +1,7 @@ #!/bin/bash # Here do anything needed to install the service -# i.e. apt-get install -y foo or bzr branch http://myserver/mycode /srv/webroot -# Make sure this hook exits cleanly and is idempotent, common problems here are -# failing to account for a debconf question on a dependency, or trying to pull -# from github without installing git first. +# i.e. apt install -y foo +# Make sure this hook exits cleanly and is idempotent. set -e status-set maintenance "Changing Default gateway" @@ -23,7 +21,6 @@ if [ "$GATEWAY_IP" == "$OLD_GATEWAY_IP" ]; then exit 0 fi - apt install -y sipcalc GATEWAY_NET=`sipcalc $GATEWAY | grep "Network address" | awk '{print $4}'` @@ -31,7 +28,7 @@ GATEWAY_NET=`sipcalc $GATEWAY | grep "Network address" | awk '{print $4}'` old_IFS=$IFS IFS=$'\n' LINE=0 -for INTERFACE in $(grep adress /etc/network/interfaces); +for INTERFACE in $(grep address /etc/network/interfaces); do ADDRESS=`echo $INTERFACE | awk '{ print $3}'` ADDRESS_NET=`sipcalc $ADDRESS | grep "Network address" | awk '{print $4}'` -- GitLab