Restart sshd service when network goes down until it goes back up again
Go to file
Reinaldy Rafli e7575ddb36
chore: add funding
2024-02-11 19:58:34 +07:00
.github chore: add funding 2024-02-11 19:58:34 +07:00
LICENSE feat: init 2022-11-25 10:19:59 +07:00
README.md feat: init 2022-11-25 10:19:59 +07:00
system-restart feat: init 2022-11-25 10:19:59 +07:00
system-restart.service feat: init 2022-11-25 10:19:59 +07:00

README.md

I hate it when my SSH service goes down because the network interface was malfunctioning.

To avoid me doing VNC and all the hassle, I made this simple stupid bash script to keep restart everything that I wanted.

Copy system-restart to $PATH, do chmod +x system-restart.

And use it: system-restart sshd 0.0.0.0:22.

It will execute ss -tlpn and grep '0.0.0.0:22', if it's empty, it will restart sshd service.

Unlicensed