Browse Source

Cleanup scripts

Bryan Roessler 2 days ago
parent
commit
8d6dd209dd

+ 0 - 1
scripts/usr/local/bin/README.md

@@ -1 +0,0 @@
-# RHEL Management Scripts

+ 1 - 1
scripts/usr/local/bin/script-deploy-manual

@@ -53,5 +53,5 @@ script-deploy-manual() {
 # Allow script to be safely sourced
 if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
   script-deploy-manual "$@"
-  exit $?
+  exit
 fi

+ 1 - 1
scripts/usr/local/bin/script-functions

@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
-# Common functions for the lab scripts
+# Common functions
 # Copyright 2021-2025 Bryan C. Roessler
 # Licensed under the Apache License, Version 2.0
 

+ 2 - 2
scripts/usr/local/bin/script-user-add

@@ -4,9 +4,9 @@
 # Licensed under the Apache License, Version 2.0
 p="${BASH_SOURCE[0]%/*}"; [[ -r $p/script-functions ]] && . "$p"/script-functions || exit 1
 
-is_root
+echo "Usage: sudo $0 [username] [password]"
 
-echo "Usage: $0 [username] [password]"
+is_root
 
 case $# in
   0) prompt user; prompt password ;;

+ 2 - 2
scripts/usr/local/bin/script-user-remove

@@ -4,9 +4,9 @@
 # Licensed under the Apache License, Version 2.0
 p="${BASH_SOURCE[0]%/*}"; [[ -r $p/script-functions ]] && . "$p"/script-functions || exit 1
 
-is_root
+echo "Usage: sudo $0 [username]"
 
-echo "This script supports one optional argument, a username"
+is_root
 
 if [[ $# -eq 1 ]]; then
   user="$1"

+ 2 - 2
scripts/usr/local/bin/script-user-unban

@@ -4,9 +4,9 @@
 # Licensed under the Apache License, Version 2.0
 p="${BASH_SOURCE[0]%/*}"; [[ -r $p/script-functions ]] && . "$p"/script-functions || exit 1
 
-is_root
+echo "Usage: sudo $0 [ip_address]"
 
-echo "This script supports one optional argument, an IP address"
+is_root
 
 if [[ $# -eq 1 ]]; then
     ip_address="$1"