mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
- Use /bin/sh and do not depend on bash
PR: ports/109768 Submitted by: Pankov Pavel <pankov_p@mail.ru> Approved by: maintainer timeout
This commit is contained in:
parent
0b14902cb3
commit
b12b87e98e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=187605
@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/bash
|
||||
#!/bin/sh
|
||||
#
|
||||
# $Id: mysqlard.server.sh 40 2006-01-20 20:26:11Z dewitge $
|
||||
#
|
||||
@ -16,7 +16,7 @@
|
||||
. %%RC_SUBR%%
|
||||
|
||||
# Source the config script
|
||||
if [[ "$datadir" == "" ]] ; then
|
||||
if [ -z "$datadir" ] ; then
|
||||
echo Loading defaultsettings
|
||||
. %%PREFIX%%/etc/mysqlard.cnf
|
||||
fi
|
||||
@ -44,11 +44,11 @@ queryfile=${queryfile:="${datadir}/queries.rrd"}
|
||||
slavefile=${slavefile:="${datadir}/slave.rrd"}
|
||||
|
||||
slaveopt=
|
||||
if [[ "$slave" != "" ]]; then
|
||||
if [ -n "$slave" ]; then
|
||||
slaveopt=-L
|
||||
fi
|
||||
|
||||
if [[ "$MYSQLHOST" != "" ]] ; then
|
||||
if [ -n "$MYSQLHOST" ] ; then
|
||||
MYSQLHOST=--host=$MYSQLHOST
|
||||
fi
|
||||
|
||||
@ -63,7 +63,7 @@ avgsamps () {
|
||||
}
|
||||
archives () {
|
||||
arch=$(($1 / $2))
|
||||
if [[ $(($2 * ${arch} * $3)) -lt $4 ]]
|
||||
if [ $(($2 * ${arch} * $3)) -lt $4 ]
|
||||
then
|
||||
arch=$((${arch} + 1))
|
||||
fi
|
||||
|
@ -2,7 +2,7 @@
|
||||
+++ src/mysqlard.server.sh Tue Aug 1 11:11:29 2006
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/usr/local/bin/bash
|
||||
+#!/bin/sh
|
||||
#
|
||||
# $Id: mysqlard.server.sh 40 2006-01-20 20:26:11Z dewitge $
|
||||
#
|
||||
|
@ -2,7 +2,7 @@
|
||||
+++ src/mysqlar.monthly.sh Tue Aug 1 11:10:54 2006
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/usr/local/bin/bash
|
||||
+#!/bin/sh
|
||||
#
|
||||
# $Id: mysqlar.monthly.sh 35 2004-03-10 15:48:41Z dewitge $
|
||||
#
|
||||
|
@ -2,7 +2,7 @@
|
||||
+++ src/mysqlar.weekly.sh Tue Aug 1 11:11:09 2006
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/usr/local/bin/bash
|
||||
+#!/bin/sh
|
||||
#
|
||||
# $Id: mysqlar.weekly.sh 35 2004-03-10 15:48:41Z dewitge $
|
||||
#
|
||||
|
@ -2,7 +2,7 @@
|
||||
+++ src/mysqlard.cnf.sh Tue Aug 1 11:11:22 2006
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/usr/local/bin/bash
|
||||
+#!/bin/sh
|
||||
# $Id: mysqlard.cnf.sh 40 2006-01-20 20:26:11Z dewitge $
|
||||
#
|
||||
# MySQL Activity Report
|
||||
|
@ -2,7 +2,7 @@
|
||||
+++ src/mysqlar.daily.sh Tue Aug 1 11:10:47 2006
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/usr/local/bin/bash
|
||||
+#!/bin/sh
|
||||
#
|
||||
# $Id: mysqlar.daily.sh 35 2004-03-10 15:48:41Z dewitge $
|
||||
#
|
||||
|
@ -2,7 +2,7 @@
|
||||
+++ src/mysqlar_graph.sh Tue Aug 1 12:53:48 2006
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/usr/local/bin/bash
|
||||
+#!/bin/sh
|
||||
#
|
||||
# $Id: mysqlar_graph.sh 40 2006-01-20 20:26:11Z dewitge $
|
||||
#
|
||||
|
@ -8,7 +8,7 @@ mysql> FLUSH PRIVILEGES;
|
||||
|
||||
2) Add the mysqlard crontab to root's crontab:
|
||||
|
||||
*/5 * * * * hourly=1 daily=1 weekly=1 monthly=1 \
|
||||
*/5 * * * * /usr/bin/env hourly=1 daily=1 weekly=1 monthly=1 \
|
||||
%%PREFIX%%/bin/mysqlar_graph > /dev/null
|
||||
|
||||
3) Add a line like this to your apache's httpd.conf:
|
||||
|
Loading…
Reference in New Issue
Block a user