Last active
March 21, 2021 21:29
-
-
Save kwilczynski/5209531 to your computer and use it in GitHub Desktop.
Mesos upstart startup script
This file contains hidden or 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/lib/mesos" | |
env MESOS_LOG_FILE="/var/log/mesos/mesos-master.out.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/lib/mesos" | |
env MESOS_LOG_FILE="/var/log/mesos/mesos-slave.out.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
Related to https://gist.github.com/kwilczynski/5209680.