From 206787b3aa651f995670b1a33dc5a293742a77ce Mon Sep 17 00:00:00 2001 From: slerena Date: Wed, 3 Dec 2008 12:18:13 +0000 Subject: [PATCH] 2008-12-03 Sancho Lerena * mysql_plugin.sh: Updated MySQL plugin. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1278 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 5 +++++ pandora_server/util/plugin/mysql_plugin.sh | 20 ++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index f0c1285577..e0b1c26ae4 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ + +2008-12-03 Sancho Lerena + + * mysql_plugin.sh: Updated MySQL plugin. + 2008-11-26 Sancho Lerena * util/plugin/mysql_plugin.sh: New Mysql plugin for Plugin server. diff --git a/pandora_server/util/plugin/mysql_plugin.sh b/pandora_server/util/plugin/mysql_plugin.sh index 284bf96f39..418e94e78e 100755 --- a/pandora_server/util/plugin/mysql_plugin.sh +++ b/pandora_server/util/plugin/mysql_plugin.sh @@ -21,15 +21,25 @@ function help { echo " ./mysql_plugin.sh -u root -p none -s localhost -q Connections" echo " ./mysql_plugin.sh -u root -p anypass -s 192.168.50.24 -q Innodb_rows_read" echo "" + exit } + +if [ $# -eq 0 ] +then + help +fi + # Main parsing code -while getopts "u:p:s:q:" optname +while getopts ":hu:p:s:q:" optname do case "$optname" in + "h") + help + ;; "u") - USER=$OPTARG + USER=$OPTARG ;; "p") PASSWORD=$OPTARG @@ -40,6 +50,12 @@ while getopts "u:p:s:q:" optname "q") QUERY=$OPTARG ;; + ?) + help + ;; + default) + help + ;; esac done