aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2011-09-27 21:42:12 +0800
committerswills <swills@FreeBSD.org>2011-09-27 21:42:12 +0800
commit7abdd5406c2f34342ebd64c0b540fc565669c073 (patch)
treead82061aaf5b37e05a1fe9811a933271b3db9dc8
parent3937377aeecf746ce48af64914b5f2217ac260b6 (diff)
downloadfreebsd-ports-gnome-7abdd5406c2f34342ebd64c0b540fc565669c073.tar.gz
freebsd-ports-gnome-7abdd5406c2f34342ebd64c0b540fc565669c073.tar.zst
freebsd-ports-gnome-7abdd5406c2f34342ebd64c0b540fc565669c073.zip
- Improve rc script so that it only checks mysql_proxy_backend_addresses
on startup - Various other rc cleanups Submitted by: dougb
-rw-r--r--databases/mysql-proxy/files/mysql-proxy.in22
1 files changed, 13 insertions, 9 deletions
diff --git a/databases/mysql-proxy/files/mysql-proxy.in b/databases/mysql-proxy/files/mysql-proxy.in
index 0a2f45be3dbf..03cdabf9ef8b 100644
--- a/databases/mysql-proxy/files/mysql-proxy.in
+++ b/databases/mysql-proxy/files/mysql-proxy.in
@@ -1,12 +1,10 @@
#!/bin/sh
-#
+
# $FreeBSD$
#
-
# 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.
@@ -35,15 +33,21 @@ load_rc_config $name
: ${mysql_proxy_enable="NO"}
: ${mysql_proxy_address=":4040"}
: ${mysql_proxy_backend_addresses="127.0.0.1:3306"}
-: ${mysql_proxy_pid_file="/var/run/mysql-proxy.pid"}
-for addr in ${mysql_proxy_backend_addresses}; do
- proxy_backend_addresses="${proxy_backend_addresses} --proxy-backend-addresses=${addr}"
-done
+start_precmd="${name}_prestart"
+
+mysql_proxy_prestart()
+{
+ local addr
+
+ for addr in ${mysql_proxy_backend_addresses}; do
+ command_args="${command_args} --proxy-backend-addresses=${addr}"
+ done
+}
-pidfile="${mysql_proxy_pid_file}"
+pidfile="${mysql_proxy_pid_file:-"/var/run/mysql-proxy.pid"}"
command=%%PREFIX%%/libexec/mysql-proxy
-command_args="--proxy-address=${mysql_proxy_address} ${proxy_backend_addresses} ${mysql_proxy_args} --daemon --pid-file=${mysql_proxy_pid_file}"
+command_args="--proxy-address=${mysql_proxy_address} ${mysql_proxy_args} --daemon --pid-file=${pidfile}"
procname=%%PREFIX%%/libexec/mysql-proxy
run_rc_command "$1"
it.cgi/freebsd-ports-gnome/commit/security/fakeroot?id=a44c192a2f5c31ae449c6b008b8a42bcc7ee099d'>Sync to new bsd.autotools.mkade2010-12-041-1/+1 * - Update to 1.14.4, some changes include :martymac2010-10-152-5/+8 * Update MAINTAINER address for my portsmartymac2010-09-271-1/+1 * - Update MAINTAINER address for Ganael Laplanche <ganael.laplanche@martymac.org>pgollucci2010-09-071-1/+1 * - Update to 1.14.3amdmi32009-11-032-4/+4 * - Update to 1.14miwi2009-10-142-4/+4 * - Update to 1.13.1miwi2009-10-072-4/+4 * - Update to 1.13miwi2009-08-202-4/+4 * Update to 1.12.5skreuzer2009-08-052-4/+4 * -Repocopy devel/libtool15 -> libtool22 and libltdl15 -> libltdl22.mezz2009-08-031-1/+1 * - Update to 1.12.4.wxs2009-06-282-4/+4 * - Update to 1.12.2miwi2009-03-142-4/+4 * - Update to 1.12.1amdmi32009-01-142-4/+4 * - Update to 1.11miwi2008-11-302-4/+4 * - Update to v1.10.1miwi2008-10-252-4/+4 * - Update to 1.9.7miwi2008-10-053-42/+42 * Update CONFIGURE_ARGS for how we pass CONFIGURE_TARGET to configure script.rafan2008-08-211-1/+0 * - Update to 1.9.6jadawin2008-08-062-4/+4 * - Update to 1.9.5jadawin2008-06-263-15/+4 * - Fix build on -CURRENT (typo in configure script)pav2008-04-261-0/+11 * - Update to 1.9.4jadawin2008-03-313-4/+6 * - Update to 1.9.3jadawin2008-03-26