Created
October 1, 2014 04:00
-
-
Save shadowbq/c9b888527d2686d29709 to your computer and use it in GitHub Desktop.
ubuntu 14.04 upstart mysql-proxy service configuration
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
# mysql-proxy.conf (Ubuntu 14.04.1) Upstart proxy configuration file for AWS RDS | |
# mysql-proxy - mysql-proxy job file | |
description "mysql-proxy upstart script" | |
author "shadowbq <[email protected]>" | |
# Stanzas | |
# | |
# Stanzas control when and how a process is started and stopped | |
# See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn | |
# When to start the service | |
start on runlevel [2345] | |
# When to stop the service | |
stop on runlevel [016] | |
# Automatically restart process if crashed | |
respawn | |
# Essentially lets upstart know the process will detach itself to the background | |
expect daemon | |
# Run before process | |
pre-start script | |
[ -d /var/run/mysql-proxy ] || mkdir -p /var/run/mysql-proxy | |
echo "starting mysql-proxy" | |
end script | |
# Start the process | |
exec /usr/bin/mysql-proxy --plugins=proxy --log-level=debug --proxy-backend-addresses=mydb.asdsadasd.us-east-1.rds.amazonaws.com:3306 --daemon --log-use-syslog --pid-file=/var/run/mysql-proxy/mysql-proxy.pid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment