Skip to content

Instantly share code, notes, and snippets.

@Jotschi
Last active November 13, 2017 17:02
Show Gist options
  • Save Jotschi/8792727 to your computer and use it in GitHub Desktop.
Save Jotschi/8792727 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
### BEGIN INIT INFO
# Provides: mysql-tmpfs
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: $network $time
# Should-Stop: $network $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop the mysql database server daemon
# Description: Controls the main MySQL database server daemon "mysqld"
# and its wrapper script "mysqld_safe".
### END INIT INFO
#
# See how we were called.
case "$1" in
start)
/opt/scripts/recreate_mysql_frombarecopy.sh
;;
stop)
/etc/init.d/mysql stop
;;
restart)
/etc/init.d/mysql stop
/opt/scripts/recreate_mysql_frombarecopy.sh
;;
*)
echo $"Usage: sandbox-mysql {start|stop|restart}"
exit
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment