I am Root. We are Root.

This commit is contained in:
2023-09-08 05:01:49 +03:00
parent 3c168336d9
commit 6c4f761551
2 changed files with 3 additions and 20 deletions

5
harden
View File

@@ -700,6 +700,7 @@ sudo systemctl restart cron
# It will also pass any arguments passed to the script to the dockerInit function.
# Then it will output a message to the user and reboot the system in 2 minutes.
function main {
printf "\x1B[01;93m========== SecDep ==========\n\x1B[0m"
printf "%s\n" "=> $SCRIPT_NAME script started <="
check_dependencies || exit 1 # Check dependencies and exit if it fails
printf "%s\n" "=> Dependencies installed <="
@@ -724,8 +725,8 @@ function main {
# If the username is not secdep, delete the remaining users
[[ "$USER" != "secdep" ]] && deleteRemainingUsers || exit 1 # Delete possible remaining users
printf "%s\n" "=> Any unnecessary users deleted <="
printf "%s\n" "=> $SCRIPT_NAME script finished <=" # Output message to the user
printf "%s\n" "=> System will reboot momentarily <=" # Output message to the user
printf "%s\n" "=> $SCRIPT_NAME script finished <="
printf "%s\n" "=> System will reboot momentarily <="
# Reboot the system in 3 minutes with the shutdown command so that login before the reboot is not possible
# If the username is not secdep, reboot the system in 1 minute
# We reboot just in case there are any updates that need to be applied