Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Featured, Processes

Raising Dead Services

Submitted by on August 15, 2019 – 2:23 pm

I suppose you may say all of this can be just as easily done via systemd service config files. Well, yes and no. Yes, it can. And, no, not as easily. Not even close. Because systemd sucks by design. But this is a subject for another post. For now just yet another lazy sysadmin’s scripted shortcut.

The script below will get a list of enabled services. It will then figure out which of those are not running and restart them (unless you added them to the exclude list in the script). An entry will be added to the log and you’ll get an email as well.

So nothing fancy, just a quick and dirty way to bounce dead services without getting into why they died in the first place. A bit like fixing your ceiling over and over while your roof is leaking. You can get this script from my GitHub repo as well.

 

Print Friendly, PDF & Email

Leave a Reply