God Init.d Script for CentOS
This is the /etc/init.d/god script we are using for God on CentOS 5.
Get God
sudo gem install god
Create a Default Config File
sudo touch /etc/god.conf
Create the Init Script
Put this in /etc/init.d/god
#!/bin/bash # # God # # chkconfig: - 85 15 # description: start, stop, restart God # RETVAL=0 case "$1" in start) /usr/local/bin/god -P /var/run/god.pid -l /var/log/god.log /usr/local/bin/god load /etc/god.conf RETVAL=$? ;; stop) kill `cat /var/run/god.pid` RETVAL=$? ;; restart) kill `cat /var/run/god.pid` /usr/local/bin/god -P /var/run/god.pid -l /var/log/god.log /usr/local/bin/god load /etc/god.conf RETVAL=$? ;; status) RETVAL=$? ;; *) echo "Usage: god {start|stop|restart|status}" exit 1 ;; esac exit $RETVAL
Make it Executable
sudo chmod a+x /etc/init.d/god
Ensure God Launches on System Boot
sudo chkconfig --add god sudo chkconfig --level 345 god on
Fire it Up
sudo /etc/init.d/god start
Leave a Reply
About Justin
Search
Recent Posts
- Easy Rails API Authentication Using restful-authentication
- God Init.d Script for CentOS
- Private, Authenticated RSS Feeds in Rails
- A Private Web Beta in Seconds with Prefinery
- Backup Your WordPress Blog to Amazon S3 using Ruby
- How to Set an Expires Header in Apache
- How to Configure Apache to Gzip Your Components
- Announcing Major Enhancements for Prefinery