Changes

From SME Server
Jump to navigationJump to search
39 bytes added ,  03:28, 22 April 2016
Line 132: Line 132:     
===Auto start Rocket.Chat at boot===
 
===Auto start Rocket.Chat at boot===
{{Note box|This section is not finished yet. It will work manually, just not yet automatically start as a SME Server service. It's a bit of a pain due the usage of Software Collections, but we will get there.}}
   
To be able to auto start Rocket.Chat one could use the /etc/rc.d/rc.local file, but using the init system is cleaner and much more controlled. Nodejs has small utilities (modules) that can create the correct init script based on your specific setup.
 
To be able to auto start Rocket.Chat one could use the /etc/rc.d/rc.local file, but using the init system is cleaner and much more controlled. Nodejs has small utilities (modules) that can create the correct init script based on your specific setup.
   Line 147: Line 146:  
  -p "/opt/rh/nodejs010/root/usr/lib/node_modules/forever/bin" rocketchat
 
  -p "/opt/rh/nodejs010/root/usr/lib/node_modules/forever/bin" rocketchat
 
Please use the correct values in the command above from your specific setup.
 
Please use the correct values in the command above from your specific setup.
 +
 +
The created init script '/etc/rc.d/init.d/rocketchat' is not aware that we use [[Software Collections]], so we have to add a directive to the init script that we do:
 +
sed -i '25 a source /etc/profile.d/scls-nodejs010.sh' /etc/rc.d/init.d/rocketchat
    
Now you can start/stop/status /etc/rc.d/init.d/rocketchat e.g.:
 
Now you can start/stop/status /etc/rc.d/init.d/rocketchat e.g.:

Navigation menu