diff options
Diffstat (limited to 'abs/core')
-rwxr-xr-x | abs/core/runit-scripts/PKGBUILD | 2 | ||||
-rwxr-xr-x | abs/core/runit-scripts/runitscripts/services/mysql/run | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/abs/core/runit-scripts/PKGBUILD b/abs/core/runit-scripts/PKGBUILD index d762d43..777d89f 100755 --- a/abs/core/runit-scripts/PKGBUILD +++ b/abs/core/runit-scripts/PKGBUILD @@ -1,6 +1,6 @@ pkgname=runit-scripts pkgver=8.5 -pkgrel=1 +pkgrel=2 pkgdesc="collection of startup scripts for runit" url="http://smarden.org/runit/" license=('BSD') diff --git a/abs/core/runit-scripts/runitscripts/services/mysql/run b/abs/core/runit-scripts/runitscripts/services/mysql/run index de76962..8fad493 100755 --- a/abs/core/runit-scripts/runitscripts/services/mysql/run +++ b/abs/core/runit-scripts/runitscripts/services/mysql/run @@ -35,6 +35,15 @@ if [ ! -d /var/run/mysqld ]; then mkdir -p /var/run/mysqld chown mysql /var/run/mysqld fi + +#check .err and truncate if more than 30000 lines +ErrFile="/data/srv/mysql/`hostname`.err" +if [[ $(wc -l < $ErrFile) -gt 30000 ]] +then + tail -n 30000 "$ErrFile" > "$ErrFile.tmp" && mv "$ErrFile.tmp" "$ErrFile" + chown mysql.mysql "$ErrFile" +fi + HOME=/etc/mysql/ MYSQLADMIN='/usr/bin/mysqladmin' |