Warn if the update script is not executed as root

This commit is contained in:
Alloy Networks
2019-07-29 19:43:10 +03:00
committed by Nik Bougalis
parent 1942fee581
commit 45c1c38993

View File

@@ -2,6 +2,12 @@
# auto-update script for rippled daemon
# Check for sudo/root permissions
if [[ $(id -u) -ne 0 ]] ; then
echo "This update script must be run as root or sudo"
exit 1
fi
LOCKDIR=/tmp/rippleupdate.lock
UPDATELOG=/var/log/rippled/update.log