K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / etc / init /
server ip : 172.67.156.115

your ip : 108.162.241.221

H O M E


Filename/etc/init/mysql.conf
Size1.73 kb
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 10:11
Last modified20-Feb-2014 05:19
Last accessed06-Jul-2025 13:34
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
# MySQL Service

description "MySQL Server"
author "Mario Limonciello <[email protected]>"

start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]

respawn
respawn limit 2 5

env HOME=/etc/mysql
umask 007

# The default of 5 seconds is too low for mysql which needs to flush buffers
kill timeout 300

pre-start script
## Fetch a particular option from mysql's invocation.
# Usage: void mysqld_get_param option
mysqld_get_param() {
/usr/sbin/mysqld --print-defaults \
| tr " " "\n" \
| grep -- "--$1" \
| tail -n 1 \
| cut -d= -f2
}

# priority can be overriden and "-s" adds output to stderr
ERR_LOGGER="logger -p daemon.err -t /etc/init/mysql.conf -i"

#Sanity checks
[ -r $HOME/my.cnf ]
[ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d /var/run/mysqld
/lib/init/apparmor-profile-load usr.sbin.mysqld

# check for diskspace shortage
datadir=`mysqld_get_param datadir`
BLOCKSIZE=`LC_ALL=C df --portability $datadir/. | tail -n 1 | awk '{print $4}'`
if [ $BLOCKSIZE -le 4096 ] ; then
echo "$0: ERROR: The partition with $datadir is too full!" >&2
echo "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER
exit 1
fi
end script

exec /usr/sbin/mysqld

post-start script
for i in `seq 1 30` ; do
/usr/bin/mysqladmin --defaults-file="${HOME}"/debian.cnf ping && {
exec "${HOME}"/debian-start
# should not reach this line
exit 2
}
statusnow=`status`
if echo $statusnow | grep -q 'stop/' ; then
exit 0
elif echo $statusnow | grep -q 'respawn/' ; then
exit 1
fi
sleep 1
done
exit 1
end script