summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/runitscripts
diff options
context:
space:
mode:
authorMichael Hanson <hansonorders@verizon.net>2011-08-02 20:12:48 (GMT)
committerMichael Hanson <hansonorders@verizon.net>2011-08-02 20:12:48 (GMT)
commit01c20a7d13169e2d77e63296de33000a7afc190d (patch)
treed1344ee265115d779841b67f5310afe2ecdff8a4 /abs/core/runit-scripts/runitscripts
parentda0250d306f5b12252c75f0574aea5cf4e2a63b9 (diff)
downloadlinhes_pkgbuild-01c20a7d13169e2d77e63296de33000a7afc190d.zip
linhes_pkgbuild-01c20a7d13169e2d77e63296de33000a7afc190d.tar.gz
linhes_pkgbuild-01c20a7d13169e2d77e63296de33000a7afc190d.tar.bz2
runit-scripts: Ensure /var/run/mysqld exists
Diffstat (limited to 'abs/core/runit-scripts/runitscripts')
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/mysql/run11
1 files changed, 8 insertions, 3 deletions
diff --git a/abs/core/runit-scripts/runitscripts/services/mysql/run b/abs/core/runit-scripts/runitscripts/services/mysql/run
index 4b1a604..9589e6d 100755
--- a/abs/core/runit-scripts/runitscripts/services/mysql/run
+++ b/abs/core/runit-scripts/runitscripts/services/mysql/run
@@ -11,13 +11,13 @@ MYSQLD_ROOT="/data/srv/mysql"
if [ ! `egrep '^mysql:' /etc/group` ]; then
stat_runit "Adding mysql group"
groupadd -g 89 mysql
-
+
fi
if [ ! `egrep '^mysql:' /etc/passwd` ]; then
stat_runit "Adding mysql user"
useradd -u 89 -g mysql -d $MYSQLD_ROOT -s /bin/false mysql
[ -d $MYSQLD_ROOT ] && chown -R mysql.mysql $MYSQLD_ROOT
-
+
fi
if [ ! -d $MYSQLD_ROOT ]; then
@@ -30,5 +30,10 @@ if [ ! -e /var/log/mysqld.log ]; then
touch /var/log/mysqld.log
chown mysql /var/log/mysqld.log
fi
-#exec /usr/sbin/mysqld --skip-name-resolve -u mysql 2>/dev/null >/dev/null
+
+if [ ! -d /var/run/mysqld ]; then
+ mkdir -p /var/run/mysqld
+ chown mysql /var/run/mysqld
+fi
+
exec /usr/sbin/mysqld -u mysql 2>/dev/null >/dev/null