Files
nando/update.sh
2018-08-13 16:23:28 +03:00

28 lines
698 B
Bash
Executable File

#!/bin/bash
[[ $UID -eq 0 ]] || {
echo Run as root to install in /usr/local/bin >&2
exit 1
}
which curl &>/dev/null || {
echo No curl command found, can not update >&2
exit 1
}
set -e
for f in nando nandod nando-desc nando-stats; do
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!"
curl -s https://bitbucket.org/MoonQ/nando/raw/tip/etc/nandorc.example
echo
echo
echo "Add systemd service to /etc/systemd/system/nando.service
systemctld enable nando
https://bitbucket.org/MoonQ/nando/raw/tip/etc/nando.service
"