Add a command to add a new user
This commit is contained in:
25
mgmt
Executable file
25
mgmt
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Management command runner - parallel to ./cmd for operational tasks
|
||||
# Usage: ./mgmt <command> [args...]
|
||||
|
||||
set -eu
|
||||
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: ./mgmt <command> [args...]"
|
||||
echo ""
|
||||
echo "Available commands:"
|
||||
for cmd in "$DIR"/framework/mgmt.d/*; do
|
||||
if [ -x "$cmd" ]; then
|
||||
basename "$cmd"
|
||||
fi
|
||||
done
|
||||
exit 1
|
||||
fi
|
||||
|
||||
subcmd="$1"
|
||||
shift
|
||||
|
||||
exec "$DIR"/framework/mgmt.d/"$subcmd" "$@"
|
||||
Reference in New Issue
Block a user