diff options
author | clsung <clsung@FreeBSD.org> | 2008-03-27 10:05:18 +0800 |
---|---|---|
committer | clsung <clsung@FreeBSD.org> | 2008-03-27 10:05:18 +0800 |
commit | 77146af66aeb35e92f2a09a24c0ab71a7a8de20d (patch) | |
tree | 50f5827f8784ee9265ab1421825027051725041c | |
parent | 6a1295c24ed76777a4f86ac9e995a71beeb4f523 (diff) | |
download | freebsd-ports-gnome-77146af66aeb35e92f2a09a24c0ab71a7a8de20d.tar.gz freebsd-ports-gnome-77146af66aeb35e92f2a09a24c0ab71a7a8de20d.tar.zst freebsd-ports-gnome-77146af66aeb35e92f2a09a24c0ab71a7a8de20d.zip |
- Startup script to mysql-proxy
Changes:
PR: ports/120183
Submitted by: <bartlomiej dot syryjczyk_AT_expro dot pl>
Reviewed by: clsung
-rw-r--r-- | databases/mysql-proxy/Makefile | 2 | ||||
-rw-r--r-- | databases/mysql-proxy/files/mysql-proxy.sh.in | 50 |
2 files changed, 52 insertions, 0 deletions
diff --git a/databases/mysql-proxy/Makefile b/databases/mysql-proxy/Makefile index b7124326d323..e104eab27e24 100644 --- a/databases/mysql-proxy/Makefile +++ b/databases/mysql-proxy/Makefile @@ -7,6 +7,7 @@ PORTNAME= mysql-proxy PORTVERSION= 0.6.1 +PORTREVISION= 1 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_MYSQL} MASTER_SITE_SUBDIR= MySQL-Proxy @@ -26,6 +27,7 @@ USE_GNOME= gnometarget pkgconfig USE_ICONV= yes USE_LUA= 5.1+ USE_MYSQL= yes +USE_RC_SUBR= mysql-proxy.sh IGNORE_WITH_MYSQL= 323 40 .include <bsd.port.mk> diff --git a/databases/mysql-proxy/files/mysql-proxy.sh.in b/databases/mysql-proxy/files/mysql-proxy.sh.in new file mode 100644 index 000000000000..d1815ed13d57 --- /dev/null +++ b/databases/mysql-proxy/files/mysql-proxy.sh.in @@ -0,0 +1,50 @@ +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/databases/mysql-proxy/files/Attic/mysql-proxy.sh.in,v 1.1 2008-03-27 02:05:18 clsung Exp $ +# + +# PROVIDE: mysql-proxy +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable mysql-proxy: +# mysql_proxy_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable MySQL Proxy. +# mysql_proxy_admin_address (str): Set to ":4041" by default. +# Set listening address:port of internal admin-server. +# mysql_proxy_address (str): Set to ":4040" by default. +# Set listening address:port of the proxy-server. +# mysql_proxy_backend_addresses (str): Set to "127.0.0.1:3306" by default. +# Set address:port of the remote backend-servers +# mysql_proxy_pid_file (path): Default to "/var/run/mysql-proxy.pid" +# Set PID file in case we are started as daemon +# mysql_proxy_args (str): Default to "" +# Custom additional arguments to be passed to mysql-proxy: +# --proxy-read-only-backend-addresses=<host:port> - address:port of the remote slave-server +# --proxy-skip-profiling - disables profiling of queries (default: enabled) +# --proxy-fix-bug-25371 - fix bug #25371 (mysqld > 5.1.12) for older libmysql versions +# --proxy-lua-script=<file> - filename of the lua script +# --no-proxy - don't start proxy-server + +. %%RC_SUBR%% + +name="mysql_proxy" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${mysql_proxy_enable="NO"} +: ${mysql_proxy_admin_address=":4041"} +: ${mysql_proxy_address=":4040"} +: ${mysql_proxy_backend_addresses="127.0.0.1:3306"} +: ${mysql_proxy_pid_file="/var/run/mysql-proxy.pid"} + +pidfile="${mysql_proxy_pid_file}" +command=%%PREFIX%%/sbin/mysql-proxy +command_args="--admin-address=${mysql_proxy_admin_address} --proxy-address=${mysql_proxy_address} --proxy-backend-addresses=${mysql_proxy_backend_addresses} ${mysql_proxy_args} --daemon --pid-file=${mysql_proxy_pid_file}" +procname=%%PREFIX%%/sbin/mysql-proxy + +run_rc_command "$1" + + |