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