housekeeping

This commit is contained in:
2026-07-10 11:56:59 -05:00
parent d711e39fb8
commit fd4b1e0fea
+5 -5
View File
@@ -40,7 +40,7 @@ system_groupadd () {
groupadd -r -g "$2" "$1"
rc=$?
if [ $rc -ne 0 ] ; then
echo "ERROR - Unable to add $1 group! ($rc)" 1>&2
echo "ERROR - Unable to add $1 group! ($rc)" >&2
exit 1
fi
}
@@ -52,7 +52,7 @@ system_useradd () {
useradd -r -u "$2" -g "$2" -s /bin/bash -m "$1"
rc=$?
if [ $rc -ne 0 ] ; then
echo "ERROR - Unable to add $1 user! ($rc)" 1>&2
echo "ERROR - Unable to add $1 user! ($rc)" >&2
exit 2
fi
}
@@ -62,7 +62,7 @@ add_groups_to_user () {
usermod -aG "$1" "$2"
rc=$?
if [ $rc -ne 0 ] ; then
echo "ERROR - Unable to add groups ($1) to user ($2)! ($rc)" 1>&2
echo "ERROR - Unable to add groups ($1) to user ($2)! ($rc)" >&2
exit 3
fi
}
@@ -79,7 +79,7 @@ as_hpf_ans () {
# Make sure we're running as root
if [ $(id -u) -ne 0 ] ; then
echo "ERROR - Not running as root!" 1>&2
echo "ERROR - Not running as root!" >&2
exit 100
fi
@@ -88,7 +88,7 @@ if which -s apt ; then
apt update
apt install bash curl python3 python3-pip python3-venv -y
else
echo "ERROR - Unable to determine how to install packages" 1>&2
echo "ERROR - Unable to determine how to install packages" >&2
exit 101
fi