From 3121898379db26a58ebb72b71d88cb27afb8293a Mon Sep 17 00:00:00 2001 From: Grzegorz Surmann Date: Mon, 29 Jul 2024 00:27:31 +0000 Subject: [PATCH] more fixes --- bin/update.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/update.sh b/bin/update.sh index d96344a..5a318ad 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -16,9 +16,7 @@ if [ ${MYUSER} != "root" ]; then fi echo "*** START ***" -cd ${MYPATH} 2>/dev/null || ( echo "ERROR: could not change to dir"; echo "*** DONE ***"; exit 1 ) -git pull -cp /opt/bgpblist/etc/systemd/bgpblacklist.service /etc/systemd/system/bgpblacklist.service -systemctl daemon-reload -systemctl restart bgpblacklist.service +cd ${MYPATH} 2>/dev/null \ + && ( git pull; cp /opt/bgpblist/etc/systemd/bgpblacklist.service /etc/systemd/system/bgpblacklist.service; systemctl daemon-reload; systemctl restart bgpblacklist.service ) \ + || ( echo "ERROR: could not change to dir" ) echo "*** DONE ***"