Skip to content

bash script to check if service is running on linux

Notifications You must be signed in to change notification settings

srihamat/servicecheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

Service Check

This service check is very usefull for our lazy team that doesn't want to manual check if service is available and on top of that our team realized the problem happened and try to fix it before our valuable customer realize it themselves.

It's actually a bash script to check if service is running on linux, then posting line instant message to let system admin know before customer.

How to use:

  1. Place file service.sh in your server
  2. Please config $token by adding token from line notification (https://notify-bot.line.me)
  3. Config crontab to call it interval for example every 5 second.
    • crontab -e
    • */5 * * * * $HOME/service.h >> $HOME/linelog.txt

Tested on Debian 4.9.88-1+deb9u1

About

bash script to check if service is running on linux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages