summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/runit-scripts/runitscripts/services/mysql/run
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core-testing/runit-scripts/runitscripts/services/mysql/run')
-rwxr-xr-xabs/core-testing/runit-scripts/runitscripts/services/mysql/run13
1 files changed, 9 insertions, 4 deletions
diff --git a/abs/core-testing/runit-scripts/runitscripts/services/mysql/run b/abs/core-testing/runit-scripts/runitscripts/services/mysql/run
index bfb367f..6b2f95a 100755
--- a/abs/core-testing/runit-scripts/runitscripts/services/mysql/run
+++ b/abs/core-testing/runit-scripts/runitscripts/services/mysql/run
@@ -1,19 +1,23 @@
#!/bin/bash
exec 2>&1
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting Mysql"
MYSQLD_ROOT="/data/srv/mysql"
# source application-specific settings
[ -f /etc/conf.d/mysqld ] && . /etc/conf.d/mysqld
if [ ! `egrep '^mysql:' /etc/group` ]; then
- stat_busy "Adding mysql group"
+ stat_runit "Adding mysql group"
groupadd -g 89 mysql
- stat_done
+
fi
if [ ! `egrep '^mysql:' /etc/passwd` ]; then
- stat_busy "Adding mysql user"
+ 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
- stat_done
+
fi
if [ ! -d $MYSQLD_ROOT ]; then
@@ -26,4 +30,5 @@ 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