Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jeremy McAnally
committed
Mar 13, 2008
1 parent
6515865
commit a354c2c
Showing
15 changed files
with
762 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
log/*.log | ||
log/*.pid | ||
coverage | ||
config/database.yml | ||
tmp/**/* | ||
.DS_Store | ||
doc/api | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
hostname jerf |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# MySQL (default setup). Versions 4.1 and 5.0 are recommended. | ||
# | ||
# Install the MySQL driver: | ||
# gem install mysql | ||
# On MacOS X: | ||
# gem install mysql -- --include=/usr/local/lib | ||
# On Windows: | ||
# gem install mysql | ||
# Choose the win32 build. | ||
# Install MySQL and put its /bin directory on your path. | ||
# | ||
# And be sure to use new-style password hashing: | ||
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | ||
# | ||
development: | ||
adapter: mysql | ||
encoding: utf8 | ||
database: signal_development | ||
username: root | ||
password: | ||
host: localhost | ||
|
||
test: | ||
adapter: sqlite3 | ||
database: ":memory:" | ||
verbosity: silent | ||
|
||
production: | ||
adapter: mysql | ||
encoding: utf8 | ||
database: signal_production | ||
username: root | ||
password: | ||
host: localhost | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
user: mongrel_rails-wiki | ||
group: app_rails-wiki | ||
cwd: /var/www/apps/rails-wiki/current | ||
log_file: /var/www/apps/rails-wiki/shared/log/mongrel.log | ||
port: "8000" | ||
environment: production | ||
address: 127.0.0.1 | ||
pid_file: /var/www/apps/rails-wiki/shared/pids/mongrel.pid | ||
servers: 2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2007 Bradley Taylor, bradley@railsmachine.com | ||
# | ||
# mongrel_cluster Startup script for Mongrel clusters. | ||
# | ||
# chkconfig: - 85 15 | ||
# description: mongrel_cluster manages multiple Mongrel processes for use \ | ||
# behind a load balancer. | ||
# | ||
|
||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local:/usr/local/sbin:/usr/local/bin | ||
CONF_DIR=/etc/mongrel_cluster | ||
PID_DIR=/var/run/mongrel_cluster | ||
# USER=mongrel | ||
|
||
EVENT=1 | ||
|
||
RETVAL=0 | ||
|
||
# Gracefully exit if the controller is missing. | ||
which mongrel_cluster_ctl >/dev/null || exit 0 | ||
|
||
# Go no further if config directory is missing. | ||
[ -d "$CONF_DIR" ] || exit 0 | ||
|
||
case "$1" in | ||
start) | ||
# Create pid directory | ||
mkdir -p $PID_DIR | ||
# chown $USER:$USER $PID_DIR | ||
|
||
mongrel_cluster_ctl start -c $CONF_DIR | ||
RETVAL=$? | ||
;; | ||
stop) | ||
mongrel_cluster_ctl stop -c $CONF_DIR | ||
RETVAL=$? | ||
;; | ||
restart) | ||
mongrel_cluster_ctl restart -c $CONF_DIR | ||
RETVAL=$? | ||
;; | ||
status) | ||
mongrel_cluster_ctl status -c $CONF_DIR | ||
RETVAL=$? | ||
;; | ||
*) | ||
echo "Usage: mongrel_cluster {start|stop|restart|status}" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit $RETVAL |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
#!/bin/sh | ||
# /etc/init.d/monit start and stop monit daemon monitor process. | ||
# Fredrik Steen, stone@debian.org | ||
: | ||
PATH=/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | ||
DAEMON=/usr/local/bin/monit | ||
CONFIG="/etc/monitrc" | ||
NAME=monit | ||
DESC="daemon monitor" | ||
|
||
set -e | ||
|
||
# Check if DAEMON binary exist | ||
test -f $DAEMON || exit 0 | ||
|
||
ARGS="-c $CONFIG" | ||
|
||
monit_not_configured () { | ||
echo -e "monit won't be started/stopped\n\tunless it it's configured" | ||
if [ "$1" != "stop" ] | ||
then | ||
echo -e "\tplease configure monit and then edit /etc/default/monit" | ||
echo -e "\tand set the \"startup\" variable to 1 in order to allow " | ||
echo -e "\tmonit to start" | ||
fi | ||
exit 0 | ||
} | ||
|
||
monit_check_config () { | ||
# Check for emtpy config, probably default configfile. | ||
if [ "`grep -s -v \"^#\" $CONFIG`" = "" ]; then | ||
echo "empty config, please edit $CONFIG." | ||
exit 0 | ||
fi | ||
} | ||
|
||
monit_check_perms () { | ||
# Check the permission on configfile. | ||
# The permission must not have more than -rwx------ (0700) permissions. | ||
|
||
# Skip checking, fix perms instead. | ||
/bin/chmod go-rwx $CONFIG | ||
|
||
} | ||
|
||
monit_delayed_monitoring () { | ||
if [ -x $DELAY ]; then | ||
$DELAY & | ||
elif [ -f $DELAY ]; then | ||
echo | ||
echo "[WARNING] A delayed start file exists ($DELAY) but it is not executable." | ||
fi | ||
} | ||
|
||
monit_check_syntax () { | ||
$DAEMON -t; | ||
# if [ $? ] ; then | ||
# echo "syntax good" | ||
# else | ||
# echo "syntax bad" | ||
# fi | ||
} | ||
|
||
|
||
monit_checks () { | ||
# Check for emtpy configfile | ||
monit_check_config | ||
# Check permissions of configfile | ||
monit_check_perms | ||
} | ||
|
||
case "$1" in | ||
start) | ||
echo -n "Starting $DESC: " | ||
monit_checks $1 | ||
echo -n "$NAME" | ||
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ | ||
--exec $DAEMON > /dev/null 2>&1 -- $ARGS | ||
monit_delayed_monitoring | ||
echo "." | ||
;; | ||
stop) | ||
echo -n "Stopping $DESC: " | ||
#monit_checks $1 | ||
echo -n "$NAME" | ||
start-stop-daemon --retry 5 --oknodo --stop --quiet --pidfile /var/run/$NAME.pid \ | ||
--exec $DAEMON > /dev/null 2>&1 | ||
echo "." | ||
;; | ||
restart|force-reload) | ||
$0 stop | ||
$0 start | ||
;; | ||
syntax) | ||
monit_check_syntax | ||
;; | ||
*) | ||
N=/etc/init.d/$NAME | ||
echo "Usage: $N {start|stop|restart|force-reload|syntax}" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit 0 |
Empty file.
Oops, something went wrong.