Skip to content

Instantly share code, notes, and snippets.

@theikkila
Last active December 11, 2015 08:28
Show Gist options
  • Save theikkila/4573125 to your computer and use it in GitHub Desktop.
Save theikkila/4573125 to your computer and use it in GitHub Desktop.
{
"server": {
"accessLog": "/var/log/hipache_access.log",
"port": 80,
"workers": 5,
"maxSockets": 100,
"deadBackendTTL": 30,
"https": {
"port": 443,
"key": "/etc/ssl/ssl.key",
"cert": "/etc/ssl/ssl.crt"
}
},
"redis": {
"port": 6379,
"host": "127.0.0.1"
}
}
# Upstart script for hipache
# Original example from Kevin van Zonneveld
# Provided under the Apache 2.0 license.
description "hipache"
author "Sienikasvusto"
start on startup
stop on shutdown
script
export HOME="/var/lib/hipache/"
echo $$ > /var/run/hipache.pid
exec sudo -u root hipache --config /var/lib/hipache/config.json >> /var/log/hipache.sys.log 2>&1
end script
pre-start script
echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Starting" >> /var/log/hipache.sys.log
end script
pre-stop script
rm /var/run/hipache.pid
echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Stopping" >> /var/log/hipache.sys.log
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment