Make life easier – Create a service on linux

Make a service on linux

To make life easier on maintaining your server or reporting on key aspects of it why not combine all your common commands, scripts, etc into a useful service that your can run. I’ve combined all the bits and bobs that I need to maintain one of the linuxgalaxy servers.

Your need to write any script in bash and then the simpliset way to get to run as a service is to copy it into the /etc/init.d folder with correct permissions as below.


The service includes:

  • Starting all the main services  on my server
  • Stop all the main services on my server
  • Restarting all the main services on my server
  • Show current network information
  • Current permissions on my main folders
  • Showing tail of my major logs
  • Ping your main servers – i.e. hosting, etc
  • Space on the local disk
  • Shows if SSL is enabled
  • Memory taken up by your major processes
  • Current status on your processes
  • Shows current IP connections to your server
  • Mail a report of all the service usage to yourself




Leave a Comment

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>