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 " +}