Search
j0ke.net Open Build Service
>
Projects
>
server:database
:
mysql
>
mysql-proxy
> mysql-proxy.init
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File mysql-proxy.init of Package mysql-proxy (Revision 14)
Currently displaying revision
14
,
show latest
#! /bin/sh # Copyright (c) 2007 Novell Inc / SUSE Linux AG, Nuernberg, Germany. # All rights reserved. # # Author: Peter Poeml <poeml@suse.de> # ### BEGIN INIT INFO # Provides: mysql-proxy # Required-Start: $local_fs $remote_fs $network # Should-Start: $named $time amavis # Required-Stop: $local_fs $remote_fs $network # Should-Stop: $named $time # 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/bin/mysql-proxy} : ${MYSQL_PROXY_PID:=/var/run/mysql-proxy/mysql-proxy.pid} if [ $MYSQL_PROXY_PID = /var/run/mysql-proxy.pid ]; then # old path. Not writable by mysql-proxy user though. echo "Your /etc/sysconfig/mysql-proxy still references /var/run/mysql-proxy.pid. Please update it to use /var/run/mysql-proxy/mysql-proxy.pid. " >&2 MYSQL_PROXY_PID=/var/run/mysql-proxy/mysql-proxy.pid fi : ${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 -u mysql-proxy -g mysql-proxy -p $MYSQL_PROXY_PID $MYSQL_PROXY_BIN --daemon --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