Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying CentOS System Administration Essentials
  • Table Of Contents Toc
CentOS System Administration Essentials

CentOS System Administration Essentials

By : Andrew Mallett
4.2 (13)
close
close
CentOS System Administration Essentials

CentOS System Administration Essentials

4.2 (13)
By: Andrew Mallett

Overview of this book

If you are a Linux administrator who is looking to gain knowledge that differentiates yourself from the crowd, then this is the book for you. Beginners who have a keen interest to learn more about Linux administration will also progress quickly with this resourceful learning guide.
Table of Contents (13 chapters)
close
close
12
Index

Creating your own Upstart script

One of the best ways in which you can learn about these services is to create your own configuration file containing the Upstart script and all the associated conditions for our service. The configuration file will require the extension of .conf and has to be created in the /etc/init directory. For the purpose of this demonstration, we will create a simple service with the well-researched and inventive name: sample.

Using the text editor vi to create the /etc/init/sample.conf file, the service begins to take shape:

#/etc/init/sample.conf
description "Simple demonstration upstart script"
author "The Urban Penguin"
start on runlevel [35]
script
  logger -p local1.info "Starting upstart service"
end script

The service itself does nothing other than use the logger program to write to the syslog daemon; we can read the output from the /var/log/messages logfile. You, of course, could adjust the service to do more; however, this acts...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
CentOS System Administration Essentials
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon