From c5f1e2169e368603e7e4934a6effba27e6631cdf Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Thu, 16 Aug 2018 13:22:32 +0300 Subject: [PATCH] update script --- update.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/update.sh b/update.sh index a156da7..f3795ae 100755 --- a/update.sh +++ b/update.sh @@ -10,18 +10,23 @@ which curl &>/dev/null || { } set -e for f in nando nandod nando-desc nando-stats; do + echo Updating $f curl -s https://bitbucket.org/MoonQ/nando/raw/tip/$f > /usr/local/bin/$f chmod a+rx /usr/local/bin/"$f" done -echo "Copy https://bitbucket.org/MoonQ/nando/raw/tip/etc/nandorc.example to /etc/nandorc and edit it!" +test -f /etc/nandorc || { +echo "Copy https://bitbucket.org/MoonQ/nando/raw/tip/etc/nandorc.example to /etc/nandorc and edit it!" curl -s https://bitbucket.org/MoonQ/nando/raw/tip/etc/nandorc.example -echo -echo -echo "Add systemd service to /etc/systemd/system/nando.service +} +test -f /etc/systemd/system/nando.service || { +echo " + +Add systemd service to /etc/systemd/system/nando.service systemctld enable nando https://bitbucket.org/MoonQ/nando/raw/tip/etc/nando.service " +}