Skip to Content
CentOS System Administration Essentials
book

CentOS System Administration Essentials

by Andrew Mallett
November 2014
Beginner
174 pages
3h 50m
English
Packt Publishing
Content preview from CentOS System Administration Essentials

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

CentOS 8 Essentials

CentOS 8 Essentials

Neil Smyth
Mastering CentOS 7 Linux Server

Mastering CentOS 7 Linux Server

Mohamed Alibi, BHASKARJYOTI ROY

Publisher Resources

ISBN: 9781783985920