Last active
August 29, 2015 13:55
-
-
Save rhoegg/8696853 to your computer and use it in GitHub Desktop.
upstart script for mule 3.4 and earlier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "Run Mule ESB" | |
author "Ryan Hoegg" | |
setuid mule | |
setgid nogroup | |
# we need real ethernet before starting: | |
start on (local-filesystems and net-device-up IFACE!=lo) | |
stop on runlevel [016] | |
kill timeout 30 | |
script | |
. /etc/default/mule | |
exec $MULE_HOME/bin/mule -M-Dspring.profiles.active=$MULE_ENV -M-DMULE_ENV=$MULE_ENV | |
end script |
Thanks for posting, this helped me. I had to remove the setuid/setguid on Centos 6.5.
One reason I use a custom upstart script instead of relying on JSW "install" feature is that I often need to run several instances of Mule side by side.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
UPDATE: To have a better working upstart script, I have updated the java service wrapper that comes with Mule and now I'm able to use their "USE_UPSTART" property. Now when doing a "mule install", Mule will install an upstart script.
According to Ryan using a symlink such as:
sudo ln -s /apps/mule/mule-enterprise-standalone-3.4.1/bin/mule /etc/init.d/mule
Doesn't work well:
"the symlink has issues doesn't have a status, restart is iffy, Although I think my upstart script also has restart issues, not waiting long enough"
Other examples of a upstart script
http://bachman.pl/devel/running-mule-esb-as-a-service-in-ubuntu/
http://wiki.nginx.org/Upstart (not specific to Mule)