SOURCES: mysql-proxy.sysconfig (NEW), mysql-proxy.init (NEW) - raw...
glen
glen at pld-linux.org
Thu Nov 22 00:07:17 CET 2007
Author: glen Date: Wed Nov 21 23:07:17 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- raw from http://download.opensuse.org/repositories/server:/database/openSUSE_10.3/src/mysql-proxy-0.6.0-1.4.src.rpm
---- Files affected:
SOURCES:
mysql-proxy.sysconfig (NONE -> 1.1) (NEW), mysql-proxy.init (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/mysql-proxy.sysconfig
diff -u /dev/null SOURCES/mysql-proxy.sysconfig:1.1
--- /dev/null Thu Nov 22 00:07:17 2007
+++ SOURCES/mysql-proxy.sysconfig Thu Nov 22 00:07:11 2007
@@ -0,0 +1,19 @@
+## Path: Network/mysql-proxy
+## Description: MySQl Proxy configuration
+
+## Type: string
+## Default: "--daemon"
+## ServiceRestart: mysql-proxy
+#
+# Command line arguments to hand over to mysql-proxy
+# Normally: --daemon (run as background daemon)
+#
+MYSQL_PROXY_ARGS="--daemon --proxy-lua-script /usr/share/doc/packages/mysql-proxy-snapshot/examples/tutorial-basic.lua"
+
+## Type: string
+## Default: "/var/run/mysql-proxy.pid"
+#
+# Location of pid file
+#
+MYSQL_PROXY_PID="/var/run/mysql-proxy.pid"
+
================================================================
Index: SOURCES/mysql-proxy.init
diff -u /dev/null SOURCES/mysql-proxy.init:1.1
--- /dev/null Thu Nov 22 00:07:17 2007
+++ SOURCES/mysql-proxy.init Thu Nov 22 00:07:11 2007
@@ -0,0 +1,80 @@
+#! /bin/sh
+# Copyright (c) 2007 Novell Inc / SUSE Linux AG, Nuernberg, Germany.
+# All rights reserved.
+#
+# Author: Peter Poeml <poeml at suse.de>
+#
+### BEGIN INIT INFO
+# Provides: mysql-proxy
+# Required-Start: $local_fs $remote_fs $network
+# Should-Start: $named $time amavis
+# Required-Stop:
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 6
+# Short-Description: MySQL Proxy
+# Description: Start the MySQL Proxy
+### END INIT INFO
+
+if [ -s /etc/sysconfig/mysql-proxy ]; then
+
+ . /etc/sysconfig/mysql-proxy
+fi
+
+: ${MYSQL_PROXY_BIN:=/usr/sbin/mysql-proxy}
+: ${MYSQL_PROXY_PID:=/var/run/mysql-proxy.pid}
+
+: ${MYSQL_PROXY_LUA_PATH:=/usr/share/mysql-proxy/?.lua}
+export LUA_PATH="$MYSQL_PROXY_LUA_PATH"
+
+. /etc/rc.status
+rc_reset
+
+case "$1" in
+ start)
+ echo -n "Starting service MySQL Proxy"
+ startproc -p $MYSQL_PROXY_PID $MYSQL_PROXY_BIN --pid-file $MYSQL_PROXY_PID $MYSQL_PROXY_ARGS
+ rc_status -v
+ ;;
+ stop)
+ echo -n "Shutting down service MySQL Proxy"
+ killproc -p $MYSQL_PROXY_PID -TERM $MYSQL_PROXY_BIN
+ rc_status -v
+ ;;
+ try-restart)
+ ## Do a restart only if the service was active before.
+ ## Note: try-restart is now part of LSB (as of 1.9).
+ ## RH has a similar command named condrestart.
+ $0 status
+ if test $? = 0; then
+ $0 restart
+ else
+ rc_reset # Not running is not a failure.
+ fi
+ # Remember status and be quiet
+ rc_status
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ rc_status
+ ;;
+ reload|force-reload)
+ echo -n "Reload service MySQL Proxy"
+ kill -HUP `cat $MYSQL_PROXY_PID* 2>/dev/null` 2> /dev/null || true
+ rc_status -v
+ ;;
+ status)
+ echo -n "Checking for service MySQL Proxy: "
+ checkproc -p $MYSQL_PROXY_PID $MYSQL_PROXY_BIN
+ rc_status -v
+ ;;
+ probe)
+ test /etc/sysconfig/mysql-proxy -nt $MYSQL_PROXY_PID \
+ && echo reload
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
+ exit 1
+esac
+rc_exit
+
================================================================
More information about the pld-cvs-commit
mailing list