但是要改 成你自己的Rails project 路徑 /home/rails_path/project
#! /bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
cd /home/rails_path/project && nohup rails s -p 30000 &
執行下列兩行Linux 指令
sudo cp run_rails_server.sh /etc/init.d/
sudo ln -s /etc/rc2.d/S168_rails_server.sh /etc/init.d/run_rails_server.sh
reboot
沒有留言:
張貼留言