-
-
Save simonlynen/8407546 to your computer and use it in GitHub Desktop.
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
description "PostgreSQL 9.1 Server" | |
author "PostgreSQL" | |
start on runlevel [2345] | |
stop on runlevel [016] | |
expect fork | |
respawn | |
env POSTGRESQL_HOME="/var/lib/postgresql/9.1/main" | |
env POSTGRESQL_CONF="/etc/postgresql/9.1/main/postgresql.conf" | |
pre-start script | |
if [ -d /var/run/postgresql ]; then | |
chmod 2775 /var/run/postgresql | |
else | |
install -d -m 2775 -o postgres -g postgres /var/run/postgresql | |
fi | |
end script | |
post-start script | |
[ -r /usr/share/postgresql-common/init.d-functions ] || exit 0 | |
. /usr/share/postgresql-common/init.d-functions | |
get_versions | |
for v in $versions; do | |
start $v | |
done | |
initctl emit inn-postgresql-start | |
end script | |
post-stop script | |
initctl emit inn-postgresql-stop | |
[ -r /usr/share/postgresql-common/init.d-functions ] || exit 0 | |
. /usr/share/postgresql-common/init.d-functions | |
get_versions | |
for v in $versions; do | |
stop $v | |
done | |
end script | |
#exec su -c "/usr/lib/postgresql/9.1/bin/postgres -D $POSTGRESQL_HOME -c config_file=$POSTGRESQL_CONF" postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment