Set nginx to automatically start on AWS after reboot

1,431 views
Skip to first unread message

Rob

unread,
Feb 5, 2013, 2:16:12 PM2/5/13
to rhom...@googlegroups.com
I am using the AWS AMI for RhoConnect.  I got thin to start automatically on reboot by

running chkconfig --add thin

However, attempting to run

 chkconfig --add nginx

results in an error of service nginx does not support chkconfig.  Has anyone out there tackled this already?

Alexander Babichev

unread,
Feb 5, 2013, 8:37:54 PM2/5/13
to rhom...@googlegroups.com
nginx init script does not

Alexander Babichev

unread,
Feb 5, 2013, 8:43:38 PM2/5/13
to rhom...@googlegroups.com
Init script has info required by chkconfig. Edit /etc/init.d/nginx file and insert the following lines (in bold):

#!/bin/sh
### BEGIN INIT INFO
# Provides:          nginx
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      S 0 1 6
# Short-Description: nginx initscript
# Description:       nginx
### END INIT INFO
...

Alexander Babichev

unread,
Feb 5, 2013, 8:44:34 PM2/5/13
to rhom...@googlegroups.com
Init script has no info required by chkconfig. ;-)

Rob

unread,
Feb 9, 2013, 12:13:30 PM2/9/13
to rhom...@googlegroups.com
Works like a charm!!!  Thanks Alexander!
Reply all
Reply to author
Forward
0 new messages