If you have used the script that comes with Alfresco, you have most likely already made your own. I created one for Ubuntu, but it should work with other variants.
- NEW! Added support for JPDA debugging and JMX console
- NEW! Also support for status (/etc/init.d/alfresco status)
- NEW! Precise doesn’t come with ‘bc’. (Really Canonical?) I removed that dependency.
- NEW! Added support for Alfresco 4.X!
- Can configure script to run Alfresco as root or a non-privileged user.
- Firewall rules will be setup at system boot if configured to run as a non-privileged user.
- Will attempt to shutdown all instances of Alfresco cleanly, will kill them after a set time if they are hung up with a default of 30 seconds.
- Cleans up rogue processes such as OpenOffice
- Able to change the umask that Alfresco creates files as. (Handy for multiuser environments.)
- Only tested on Ubuntu Server 10.04 and 12.04 (Lucid and Precise LTS releases)
- The script directly calls Java, bypassing alfresco.sh and even catalina.sh. It was the only way I could seem to get everything working smoothly including umasks. So the biggest downside of this, is that future versions of Alfresco may have different Tomcat start up parameters.
- Copy and paste the script into the file: /etc/init.d/alfresco
- Edit the “### Configurable variables” section in the script to suit your environment
- chmod +x /etc/init.d/alfresco
- update-rc.d alfresco start 99 2 3 4 5 . stop 99 0 1 6 .
Feel free to email myself any bugs, feedback ,or requests. My email address is the user name you see here at the top of the blog @abstractive.ca.
Here is a link with proper indentation and easier copying: