This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
check process starling_22122 with pidfile YOUR_WEB_APP/pids/starling_22122.pid | |
start program = "/home/YOUR_USER/scripts/starling start 22122" | |
stop program = "/home/YOUR_USER/scripts/starling stop 22122" | |
if cpu > 80% for 5 cycles then restart | |
if failed port 22122 with timeout 10 seconds then restart | |
if 3 restarts within 5 cycles then timeout | |
mode active | |
group YOUR_APP_NAME | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
check process workling0 with pidfile YOUR_WEB_APP/log/workling0.pid | |
group YOUR_APP_NAME | |
start program = "/home/YOUR_USER/scripts/workling start 0" | |
stop program = "/home/YOUR_USER/scripts/workling stop 0" | |
if totalmem > 60 Mb then restart | |
if cpu is greater than 60% for 2 cycles then alert | |
if cpu > 80% for 5 cycles then restart | |
if loadavg(5min) greater than 10 for 8 cycles then restart | |
if 3 restarts within 5 cycles then timeout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
### BEGIN INIT INFO | |
# Provides: starling | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start/stop starling server | |
### END INIT INFO | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
### BEGIN INIT INFO | |
# Provides: workling | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start/stop worklings | |
### END INIT INFO | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# starling This init.d script is used to start starling. | |
# It basically just calls starling. | |
ENV="env -i LANG=C PATH=/usr/local/bin:/usr/bin:/bin" | |
set -e | |
if [ -x /usr/bin/starling ] ; then | |
HAVE_STARLING=1 | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# workling This init.d script is used to start workling. | |
# It basically just calls workling. | |
. /lib/lsb/init-functions | |
ROOT="YOUR_WEB_APP" | |
PID=$ROOT"log/workling$2.pid" | |
WORKLING=$ROOT"script/workling_client" | |
START_COMMAND=$WORKLING" start" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
## Monit control file | |
############################################################################### | |
## | |
## Comments begin with a '#' and extend through the end of the line. Keywords | |
## are case insensitive. All path's MUST BE FULLY QUALIFIED, starting with '/'. | |
## | |
## Below you will find examples of some frequently used statements. For | |
## information about the control file, a complete list of statements and | |
## options please have a look in the monit manual. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :deploy do | |
task :start do | |
restart_monit | |
sudo "monit -g #{application} start all" | |
START WEB SERVER (mongrels, thins, litespeed, whatever) | |
end | |
task :stop do | |
restart_monit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE: We have to replace the 'releases/xxxx' folder with 'current' | |
define('FCPATH', preg_replace('/releases\/\d*\//', 'current/', __FILE__)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// When animation starts | |
ExternalInterface.call('js_get_flash_val', [animationName], 'start'); | |
// When animation finishes | |
ExternalInterface.call('js_get_flash_val', [animationName], 'finish'); |
OlderNewer