summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts/runitscripts/services
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/runit-scripts/runitscripts/services')
-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