aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-08-15 16:47:02 +0100
committerGareth Rees <gareth@mysociety.org>2014-08-15 16:47:02 +0100
commitc593ed2a0565b6f9ab2c2abb994ee6d5b254e65f (patch)
treea372b518c08cf7f4ef4b15d742f5d943357904ad
parent76251a9c45b477ea2572239b53def555fbfd70e4 (diff)
parent609e81c0165d4740a22837c726921e981605bfbe (diff)
Merge branch 'sysvinit-passenger' into rails-3-develop
-rwxr-xr-xconfig/sysvinit-passenger.ugly59
-rw-r--r--public/down.default.html13
2 files changed, 64 insertions, 8 deletions
diff --git a/config/sysvinit-passenger.ugly b/config/sysvinit-passenger.ugly
new file mode 100755
index 000000000..0940a4d63
--- /dev/null
+++ b/config/sysvinit-passenger.ugly
@@ -0,0 +1,59 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: application-passenger-!!(*= $site *)!!
+# Required-Start: $local_fs $network
+# Required-Stop: $local_fs $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Starts the Passenger app server for the "!!(*= $site *)!!" site
+# Description: The Passenger app server for the "!!(*= $site *)!!" site
+### END INIT INFO
+
+# This example sysvinit script is based on the helpful example here:
+# http://richard.wallman.org.uk/2010/02/howto-deploy-a-catalyst-application-using-fastcgi-and-nginx/
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+NAME=!!(*= $site *)!!
+SITE_HOME=!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!
+DESC="Alaveteli app server"
+USER=!!(*= $user *)!!
+
+set -e
+
+start_daemon() {
+ echo -n "Starting $DESC: "
+ rm -f "$SITE_HOME/public/down.html"
+ echo "$NAME."
+}
+
+stop_daemon() {
+ echo -n "Stopping $DESC: "
+ cp "$SITE_HOME/public/down.default.html" "$SITE_HOME/public/down.html"
+ echo "$NAME."
+}
+
+restart_daemon() {
+ echo -n "Restarting $DESC: "
+ rm -f "$SITE_HOME/public/down.html"
+ touch "$SITE_HOME/tmp/restart.txt"
+ echo "$NAME."
+}
+
+case "$1" in
+ start)
+ start_daemon
+ ;;
+ stop)
+ stop_daemon
+ ;;
+ reload|restart|force-reload)
+ restart_daemon
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|reload|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/public/down.default.html b/public/down.default.html
index 0440f91f9..d6291a74a 100644
--- a/public/down.default.html
+++ b/public/down.default.html
@@ -3,12 +3,12 @@
<head>
<meta charset="utf-8">
<title>
- WhatDoTheyKnow - make and browse Freedom of Information (FOI) requests
+ Alaveteli - make and browse Freedom of Information (FOI) requests
</title>
- <link href="/assets/main.css" media="screen" rel="stylesheet" title="Main" type="text/css">
+ <link href="/assets/application.css" media="screen" rel="stylesheet" title="Main" type="text/css">
<!--[if LT IE 7]>
- <style type="text/css">@import url("/stylesheets/ie6.css");</style>
+ <style type="text/css">@import url("/assets/ie6.css");</style>
<![endif]-->
</head>
@@ -17,15 +17,12 @@
<div id="banner">
</div>
<div id="header">
- <h1>
- <a href="/">WhatDoTheyKnow?</a>
- </h1>
<div id="tagline">
Make and explore Freedom of Information requests
</div>
</div>
<div id="mysoclogo">
- <a href="http://www.mysociety.org">a site by mysociety.org</a>
+ <a href="http://www.alaveteli.org">powered by Alaveteli</a>
</div>
<div id="topnav">
<ul id="navigation"></ul>
@@ -35,7 +32,7 @@
<div id="content">
<div id="general_frontpage">
<div id="frontpage_search">
- <h1>Sorry. WhatDoTheyKnow is down for maintenance. Please come back in a few minutes.</h1>
+ <h1>Sorry. We&rsquo;re down for maintenance. Please come back in a few minutes.</h1>
</div>
</div>
</div>