Security script: ubuntu server automatic check of services

Looking at this post on about perl i got the idea to write my own script to check if all services are running.

Here it is:

There are only a few things you have to do:

  • change the path to the script in the script (necessary cause we use cron)
  • put it in your crontab:
    • “crontab -e” as root
    • set your local PATH variable (look it up in the shell with “echo $PATH”)
    • * * * * * /PATH_TO_YOUR_SCRIPT/
  • think about how you observe the logfile (maybe you want an email or a notification at login)

If you like the script, see any points i missed or have problems: let me know it and write a comment!

Leave a Reply

Your email address will not be published. Required fields are marked *