I use Phergie http://phergie.org with my server to sit on a few IRC channels and provide features I find useful. However I used to initialize Phergie with a sc command watch it sit behind screen and have to monitor it that way. I got sick of that and wrote a Upstart script to do all this for me now
# This upstart script is provided in the spirit of open source software. # The license is simple: you are free to do whatever you want with this file. # # Phergie init script Anthony Wlodarski <ant92083@gmail.com> # # This will allow you to do: # # service phergie start # service phergie stop # service phergie restart # # and various other different commands specified by the upstart daemon. # Please visit http://upstart.ubuntu.com/ for more information on how # to customize this script. # Make sure the file system and network devices have started before # we begin the daemon start on (filesystem and net-device-up IFACE!=lo) # Stop the event daemon on system shutdown stop on shutdown # Respawn the process on unexpected termination respawn # The meat and potatoes exec /usr/bin/phergie /usr/share/php/Phergie/Settings.php >> /var/log/phergie.log 2>&1
As you can see that even if you installed from tarball source you can customize the last line to something such as:
“/path/to/php /path/to/phergie.php /path/to/Settings.php”
The logging part is optional and should only be used if “ui.enabled => true” is in the Settings.php.
The next step, writing a plugin for http://livethesheendream.com/ to provide Charlie Sheen quotes. #winning Phergie does it!
Pingback: Using Phergie with Upstart — Phergie