Skip to content

Commit

Permalink
Updated readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiri Hnidek committed Mar 3, 2015
1 parent b1e93c5 commit 7264fea
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ To build example of daemon you have to type following commands:
cd daemon
mkdir build
cd build
cmake ../
cmake -DCMAKE_INSTALL_PREFIX=/usr ../
make
sudo make install
## Usage
Expand All @@ -76,4 +77,27 @@ have a look at command line parameters and arguments
When you will run `./bin/daemon` with parameter `--daemon` or `-d`, then
it will become real UNIX daemon. But this is not the way, how UNIX daemons
are started nowdays. Some init scripts or service files are used for
this purpose.
this purpose.
When you use Linux distribution using systemd, then you can try to copy
file `forking-daemon.service` or `simple-daemon.service` to directory:
/usr/lib/systemd/system
and then start daemon using
systemctl start simple-daemon
systemctl status simple-daemon
systemctl reload simple-daemon
systemctl stop simple-daemon
When you use RedHat 4/5/6 or CentOS, then you can try to use init script:
cp daemon.init /etc/rc.d/init.d/daemond
Then it should be possible to control daemon using:
service daemon start
service daemon status
service daemon reload
service daemon stop

0 comments on commit 7264fea

Please sign in to comment.