diff options
author | Jose M. Guisado <jguisado@soleta.eu> | 2022-09-22 18:19:24 +0200 |
---|---|---|
committer | Jose M. Guisado <jguisado@soleta.eu> | 2022-09-22 18:46:38 +0200 |
commit | 9eb874680d9e78f0997f0249fb74d147f4d20752 (patch) | |
tree | 08fb4f1cde2d5ede2e784c11b45a7d928ad4d8b5 | |
parent | 9ae15014b1e80f0fe9363119a0b16f2754980773 (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-x | server/bin/oglivecli | 2 |
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 $? |