-
Notifications
You must be signed in to change notification settings - Fork 699
Daemonizing log.io on Ubuntu using upstart (v0.3.x)
Mike Smathers edited this page Aug 1, 2014
·
2 revisions
v0.3.x of log.io no longer uses forever to automatically daemonize the server and harvester processes. Here's an example of how to use upstart on Ubuntu to automatically start the server and/or harvester on startup, as well as ensure that it gets respawned if it crashes. The following assumes you installed log.io globally.
For the server, paste the following into /etc/init/log.io-server.conf
:
description "start log.io server"
start on runlevel [2345]
stop on runlevel [016]
respawn
exec su -s /bin/sh -c 'exec "$0" "$@"' ubuntu -- /usr/local/bin/log.io-server
For the harvester, paste the following into /etc/init/log.io-harvester.conf
:
description "start log.io harvester"
start on runlevel [2345]
stop on runlevel [016]
respawn
exec su -s /bin/sh -c 'exec "$0" "$@"' ubuntu -- /usr/local/bin/log.io-harvester
The server and/or harvester will now launch on machine startup.
To manually start the server and/or harvester:
sudo start log.io-server
sudo start log.io-harvester
To manually stop the server and/or harvester:
sudo stop log.io-server
sudo stop log.io-harvester
You can access the logs in:
/var/log/upstart/log.io-server.log
/var/log/upstart/log.io-harvester.log