Skip to content

Instantly share code, notes, and snippets.

@ichikaway
Created January 18, 2012 14:58
Show Gist options
  • Save ichikaway/1633368 to your computer and use it in GitHub Desktop.
Save ichikaway/1633368 to your computer and use it in GitHub Desktop.
/etc/rc.d/init.d/onMemoryMySQL
#!/bin/bash
#
# Startup script for onMemoryMySQL
# chkconfig: 345 85 15
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/usr/bin:/bin
test -f /root/onMemoryDeploy.sh || exit 0
start()
{
/root/onMemoryDeploy.sh start
touch /var/lock/subsys/onMemoryMySQL
}
stop()
{
/root/onMemoryDeploy.sh stop
rm -f /var/lock/subsys/onMemoryMySQL
}
case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo "Usage: onMemoryMySQL start or stop"
exit 1
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment