Project

General

Profile

Problem with autostart of Redmine on CentOS 6.5

Added by Alex N about 10 years ago

Please help me to make Redmine autostart.

Firstly i added an string to rc.local - it looks like this:
/usr/local/rvm/rubies/ruby-2.0.0-p451/bin/ruby /var/www/redmine/script/rails server -p 3000 -e production
but with no luck

then i created an "autoloading enabled" file "startredmine" in folder init.d and this method failed too

contents of "startredmine"
------------------------------------
#!/bin/bash #
  1. BEGIN INIT INFO
  1. Provides: blk-availability
  2. Required-Start:
  3. Required-Stop:
  4. Default-Start: 1 2 3 4 5
  5. Default-Stop: 0 6
  6. Short-Description: Availability of block devices
    1. END INIT INFO

. /etc/init.d/functions

rtrn=1

case "$1" in
start)
/usr/local/rvm/rubies/ruby-2.0.0-p451/bin/ruby /var/www/redmine/script/rails server -p 3000 -e production
;;

stop)
;;
status)
;;
*)
echo $"Usage: $0 {start|stop|status}"
;;
esac
---------------------------------------------------------------

--------------------------------------------------------------------------
[root@vps redmine]# RAILS_ENV=production script/about

sh: darcs: command not found
sh: hg: command not found
sh: bzr: command not found
Environment:
Redmine version 2.5.1.stable.13103
Ruby version 2.0.0-p451 (2014-02-24) [x86_64-linux]
Rails version 3.2.17
Environment production
Database adapter Mysql2
SCM:
Subversion 1.6.11
Git 1.7.1
Filesystem
Redmine plugins:
no plugin installed



    (1-1/1)