2

i have a ubuntu EC2 instance and i want start my rails server at boot. So i have a script:

start.sh

#!/bin/bash
#
# Start Rails Server
cd ~/spree
rails server -d

and i have this in my rc.local:

rc.local

#!/bin/sh -e
#
# rc.local
#
sudo -u ubuntu -i ~/start.sh

exit 0

if i run "sudo /etc/init.d/rc.local start", all work fine but at reboot the server not start...any suggestion?

SaroVin
  • 130
  • 3

1 Answers1

0

SOLUTION:

#!/bin/bash
#
# Start Rails Server
cd /home/ubuntu/spree && rails server -d
SaroVin
  • 130
  • 3