summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2022-09-22 18:19:24 +0200
committerJose M. Guisado <jguisado@soleta.eu>2022-09-22 18:46:38 +0200
commit9eb874680d9e78f0997f0249fb74d147f4d20752 (patch)
tree08fb4f1cde2d5ede2e784c11b45a7d928ad4d8b5
parent9ae15014b1e80f0fe9363119a0b16f2754980773 (diff)
oglivecli: more helpful usage error message
Valid commands depend on the "access level" determined by: - You are root (root) - You can read /opt/opengnsys/www/controlacceso.php (web) Users might not know this, so invite to run as sudo if running some command is not valid because of this.
-rwxr-xr-xserver/bin/oglivecli2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/bin/oglivecli b/server/bin/oglivecli
index 1c064ae7..beaaf0d1 100755
--- a/server/bin/oglivecli
+++ b/server/bin/oglivecli
@@ -451,7 +451,7 @@ case "$ACCESS" in
esac
case "$1" in
$CMDS) COMMAND="${1/-/}"; shift; $COMMAND "$@" ;;
- *) raiseError usage ;;
+ *) echo "You need to be root to run this command." && exit 1 ;;
esac
exit $?