-
-
Save JasonGiedymin/7719777 to your computer and use it in GitHub Desktop.
Updating with mesos trunk: - Change log location - Change mesos home (temporary)
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 "Mesos Master" | |
start on runlevel [2345] | |
stop on starting rc RUNLEVEL=[016] | |
respawn | |
respawn limit 2 5 | |
env MESOS_CONFIG="/etc/mesos/conf" | |
env MESOS_HOME="/usr/local/lib" | |
env MESOS_LOG_FILE="/var/log/mesos/mesos-master.log" | |
umask 007 | |
kill timeout 300 | |
pre-start script | |
[ -r $MESOS_CONFIG ] | |
end script | |
limit nofile 32768 32768 | |
script | |
exec > $MESOS_LOG_FILE 2>&1 | |
MESOS_MASTER_ENABLED="no" | |
[ -e "/etc/default/mesos" ] && . "/etc/default/mesos" | |
if [ "x$MESOS_MASTER_ENABLED" = "xyes" ]; then | |
if [ -e /usr/sbin/mesos-detect-java.sh ]; then | |
. /usr/sbin/mesos-detect-java.sh | |
fi | |
export JAVA_HOME LD_LIBRARY_PATH | |
exec /usr/sbin/mesos-master --conf=${MESOS_CONFIG} | |
fi | |
end script | |
description "Mesos Slave" | |
start on runlevel [2345] | |
stop on starting rc RUNLEVEL=[016] | |
respawn | |
respawn limit 2 5 | |
env MESOS_CONFIG="/etc/mesos/conf" | |
env MESOS_HOME="/usr/local/lib" | |
env MESOS_LOG_FILE="/var/log/mesos/mesos-slave.log" | |
umask 007 | |
kill timeout 300 | |
pre-start script | |
[ -r $MESOS_CONFIG ] | |
end script | |
limit nofile 32768 32768 | |
script | |
exec > $MESOS_LOG_FILE 2>&1 | |
MESOS_SLAVE_ENABLED="no" | |
[ -e "/etc/default/mesos" ] && . "/etc/default/mesos" | |
if [ "x$MESOS_SLAVE_ENABLED" = "xyes" ]; then | |
if [ -e /usr/sbin/mesos-detect-java.sh ]; then | |
. /usr/sbin/mesos-detect-java.sh | |
fi | |
export JAVA_HOME LD_LIBRARY_PATH | |
exec /usr/sbin/mesos-slave --conf=${MESOS_CONFIG} | |
fi | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mesos trunk as of 15-rc3 has good upstarts (and I use them), but this script does make use of a better means of detecting java.