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