again better
This commit is contained in:
@@ -103,7 +103,8 @@ EOF
|
||||
restart_sshd() {
|
||||
if systemctl is-active --quiet sshd; then
|
||||
local sshd_pid=$(systemctl show --property MainPID --value sshd)
|
||||
kill -SIGHUP $sshd_pid
|
||||
echo "Restarting sshd service..."
|
||||
systemctl restart sshd
|
||||
echo -e "$GREEN_CHECK Restarted sshd service on PID: $sshd_pid"
|
||||
else
|
||||
echo -e "$YELLOW_BANG Not running sshd service"
|
||||
|
||||
Reference in New Issue
Block a user