summaryrefslogtreecommitdiff
path: root/databases/pgbouncer/files
diff options
context:
space:
mode:
Diffstat (limited to 'databases/pgbouncer/files')
-rw-r--r--databases/pgbouncer/files/pgbouncer.sh4
-rw-r--r--databases/pgbouncer/files/smf/manifest.xml32
2 files changed, 34 insertions, 2 deletions
diff --git a/databases/pgbouncer/files/pgbouncer.sh b/databases/pgbouncer/files/pgbouncer.sh
index e97387267c8..4d519a5b2f7 100644
--- a/databases/pgbouncer/files/pgbouncer.sh
+++ b/databases/pgbouncer/files/pgbouncer.sh
@@ -1,6 +1,6 @@
#! @RCD_SCRIPTS_SHELL@
#
-# $NetBSD: pgbouncer.sh,v 1.1.1.1 2011/09/03 22:15:51 mjl Exp $
+# $NetBSD: pgbouncer.sh,v 1.2 2014/05/13 14:18:49 fhajny Exp $
#
# PROVIDE: pgbouncer
# REQUIRE: DAEMON
@@ -23,7 +23,7 @@ start_cmd="pgbouncer_start"
pidfile="@VARBASE@/run/${name}/${name}.pid"
if [ -r ${pgbouncer_conf} ] ; then
- pidfile=`grep -i pidfile /usr/pkg/etc/pgbouncer.ini | cut -d= -f2`
+ pidfile=`grep -i pidfile ${pgbouncer_conf} | cut -d= -f2`
fi
pgbouncer_start()
diff --git a/databases/pgbouncer/files/smf/manifest.xml b/databases/pgbouncer/files/smf/manifest.xml
new file mode 100644
index 00000000000..938d3f37b00
--- /dev/null
+++ b/databases/pgbouncer/files/smf/manifest.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="@SMF_NAME@">
+ <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+ <create_default_instance enabled="false" />
+ <single_instance />
+ <dependency name="network" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/milestone/network:default" />
+ </dependency>
+ <dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
+ <service_fmri value="svc:/system/filesystem/local" />
+ </dependency>
+ <method_context working_directory="@PGHOME@">
+ <method_credential user="@PGUSER@" group="@PGGROUP@" />
+ </method_context>
+ <exec_method type="method" name="start" exec="@PREFIX@/bin/pgbouncer -d %{config_file}" timeout_seconds="60" />
+ <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+ <property_group name="startd" type="framework">
+ <propval name="duration" type="astring" value="contract" />
+ <propval name="ignore_error" type="astring" value="core,signal" />
+ </property_group>
+ <property_group name="application" type="application">
+ <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/pgbouncer.ini" />
+ </property_group>
+ <stability value="Evolving" />
+ <template>
+ <common_name>
+ <loctext xml:lang="C">PgBouncer daemon</loctext>
+ </common_name>
+ </template>
+ </service>
+</service_bundle>