Import initial SMF support for individual packages.

This commit is contained in:
jperkin 2014-03-11 14:34:36 +00:00
parent e393ce6d94
commit 222f8dc36b
99 changed files with 2992 additions and 36 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.38 2014/03/10 11:35:07 fhajny Exp $
# $NetBSD: Makefile,v 1.39 2014/03/11 14:34:36 jperkin Exp $
DISTNAME= ejabberd-13.12
CATEGORIES= chat
@ -54,6 +54,8 @@ OWN_DIRS_PERMS+= ${EJABBERD_DB} ${EJABBERD_USER} ${EJABBERD_GROUP} 0770
FILES_SUBST+= DISTNAME=${DISTNAME}
FILES_SUBST+= EJABBERD_USER=${EJABBERD_USER}
FILES_SUBST+= EJABBERD_GROUP=${EJABBERD_GROUP}
FILES_SUBST+= EJABBERD_DB=${EJABBERD_DB}
PLIST_SUBST+= DISTNAME=${DISTNAME}
PLIST_SUBST+= EJABBERD_EXDIR=${EJABBERD_EXDIR}

View file

@ -0,0 +1,39 @@
<?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='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/service' />
</dependency>
<dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/system-log' />
</dependency>
<dependency name='config-files' grouping='require_any' restart_on='refresh' type='path'>
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/ejabberd.cfg' />
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/ejabberctl.cfg' />
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/inetrc' />
</dependency>
<dependency name='@SMF_NAME@-epmd' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/@SMF_PREFIX@/epmd' />
</dependency>
<method_context working_directory='@EJABBERD_DB@'>
<method_credential user='@EJABBERD_USER@' group='@EJABBERD_GROUP@' />
</method_context>
<exec_method name='start' type='method' exec='@PREFIX@/sbin/ejabberdctl start' timeout_seconds='120' />
<exec_method name='stop' type='method' exec='@PREFIX@/sbin/ejabberdctl stop' timeout_seconds='60' />
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal' />
</property_group>
<stability value='Unstable' />
<template>
<common_name>
<loctext xml:lang='C'>ejabberd - the Erlang Jabber/XMPP daemon</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -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">
<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>
<instance name="default" enabled="false">
<method_context>
<method_credential user="@JABBER_USER@" group="@JABBER_GROUP@" />
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/bin/spectrum %{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@/spectrum.cfg" />
</property_group>
</instance>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Spectrum XMPP gateway</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.15 2014/02/14 10:25:23 fhajny Exp $
# $NetBSD: Makefile,v 1.16 2014/03/11 14:34:36 jperkin Exp $
#
DISTNAME= apache-cassandra-${CASSANDRA_VER}
@ -29,6 +29,7 @@ EGDIR= ${PREFIX}/share/examples/cassandra
DOCDIR= ${PREFIX}/share/doc/cassandra
RCD_SCRIPTS= cassandra
SMF_NAME= cassandra
CASSANDRA_USER?= cassandra
CASSANDRA_GROUP?= cassandra
PKG_GROUPS= ${CASSANDRA_GROUP}

View file

@ -0,0 +1,34 @@
<?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 project="@SMF_NAME@" working_directory="@CASSANDRA_HOME@">
<method_credential user="@CASSANDRA_USER@" group="@CASSANDRA_GROUP@" />
<method_environment>
<envvar name="JAVA_HOME" value="@PREFIX@/java/sun6" />
<envvar name="JVM_OPTS" value="-d64" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/share/cassandra/bin/cassandra -p @VARBASE@/lib/cassandra/cassandra.pid" timeout_seconds="600" />
<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"></property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Apache Cassandra</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.23 2014/02/12 23:17:38 tron Exp $
# $NetBSD: Makefile,v 1.24 2014/03/11 14:34:36 jperkin Exp $
#
DISTNAME= apache-couchdb-1.5.0
@ -42,6 +42,10 @@ COUCH_RUNDIR?= ${VARBASE}/spool/couchdb
COUCH_RUNDIR?= ${VARBASE}/run/couchdb
.endif
FILES_SUBST+= COUCH_USER=${COUCH_USER}
FILES_SUBST+= COUCH_GROUP=${COUCH_GROUP}
FILES_SUBST+= COUCH_DBDIR=${COUCH_DBDIR}
OWN_DIRS= ${COUCH_LOGDIR} ${COUCH_DBDIR} ${COUCH_RUNDIR} ${PKG_SYSCONFDIR}
OWN_DIRS_PERMS+= ${COUCH_DBDIR} ${COUCH_USER} ${COUCH_GROUP} 0770
OWN_DIRS_PERMS+= ${COUCH_LOGDIR} ${COUCH_USER} ${COUCH_GROUP} 0770

View file

@ -0,0 +1,39 @@
<?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>
<dependency name='@SMF_NAME@-epmd' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/@SMF_PREFIX@/epmd' />
</dependency>
<method_context working_directory="@COUCH_DBDIR@">
<method_credential user="@COUCH_USER@" group="@COUCH_GROUP@" />
<method_environment>
<envvar name="PATH" value="@PREFIX@/sbin:@PREFIX@/bin:/sbin:/usr/sbin:/usr/bin" />
<envvar name="HOME" value="@COUCH_DBDIR@" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/bin/couchdb -b" 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@/local.ini" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">CouchDB server</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.19 2014/02/12 23:17:39 tron Exp $
# $NetBSD: Makefile,v 1.20 2014/03/11 14:34:36 jperkin Exp $
PKGNAME= ${DISTNAME:S/-/-server-/}
PKGREVISION= 1
@ -52,6 +52,8 @@ PKG_HOME.${MYSQL_USER}= ${MYSQL_DATADIR}
PKG_SHELL.${MYSQL_USER}= ${SH}
RCD_SCRIPTS= mysqld
SMF_NAME= mysql
SMF_METHODS= ${RCD_SCRIPTS}
FILES_SUBST+= HOSTNAME_CMD=${HOSTNAME_CMD:Q} \
MYSQL_DATADIR=${MYSQL_DATADIR} \

View file

@ -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='fs' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='net' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/loopback' />
</dependency>
<method_context project='mysql' working_directory='@MYSQL_DATADIR@'>
<method_credential user='@MYSQL_USER@' group='@MYSQL_GROUP@' />
<method_environment>
<envvar name='LD_PRELOAD_32' value='/usr/lib/extendedFILE.so.1' />
</method_environment>
</method_context>
<exec_method name='start' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.mysql@ start' timeout_seconds='18446744073709551615' />
<exec_method name='stop' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.mysql@ stop' timeout_seconds='18446744073709551615' />
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>MySQL RDBMS</loctext>
</common_name>
<documentation>
<manpage title='MySQL 5.1' section='1' />
<doc_link name='mysql.com' uri='http://dev.mysql.com/docs' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,31 @@
#!@SMF_METHOD_SHELL@
#
# $NetBSD: mysqld.sh,v 1.1 2014/03/11 14:34:36 jperkin Exp $
#
# Init script for mysqld.
#
. /lib/svc/share/smf_include.sh
PIDFILE="@MYSQL_DATADIR@/mysql.pid"
ulimit -n 10240
case "$1" in
start)
@LOCALBASE@/sbin/mysqld --user=mysql \
--basedir=@LOCALBASE@ \
--datadir=@MYSQL_DATADIR@ \
--pid-file=${PIDFILE} \
--log-error=@VARBASE@/log/mysql/error.log &
;;
stop)
[ -f ${PIDFILE} ] && kill `@HEAD@ -1 ${PIDFILE}`
;;
*)
echo "Usage: $0 {start|stop}" >&2
exit 1
;;
esac
exit $SMF_EXIT_OK

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.18 2014/02/12 23:17:39 tron Exp $
# $NetBSD: Makefile,v 1.19 2014/03/11 14:34:36 jperkin Exp $
PKGNAME= ${DISTNAME:S/-/-server-/}
PKGREVISION= 1
@ -45,6 +45,8 @@ PKG_HOME.${MYSQL_USER}= ${MYSQL_DATADIR}
PKG_SHELL.${MYSQL_USER}= ${SH}
RCD_SCRIPTS= mysqld
SMF_NAME= mysql
SMF_METHODS= ${RCD_SCRIPTS}
FILES_SUBST+= HOSTNAME_CMD=${HOSTNAME_CMD:Q}
FILES_SUBST+= MYSQL_DATADIR=${MYSQL_DATADIR}

View file

@ -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='fs' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='net' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/loopback' />
</dependency>
<method_context project='mysql' working_directory='@MYSQL_DATADIR@'>
<method_credential user='@MYSQL_USER@' group='@MYSQL_GROUP@' />
<method_environment>
<envvar name='LD_PRELOAD_32' value='/usr/lib/extendedFILE.so.1' />
</method_environment>
</method_context>
<exec_method name='start' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.mysql@ start' timeout_seconds='18446744073709551615' />
<exec_method name='stop' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.mysql@ stop' timeout_seconds='18446744073709551615' />
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>MySQL RDBMS</loctext>
</common_name>
<documentation>
<manpage title='MySQL 5.5' section='1' />
<doc_link name='mysql.com' uri='http://dev.mysql.com/docs' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,31 @@
#!@SMF_METHOD_SHELL@
#
# $NetBSD: mysqld.sh,v 1.1 2014/03/11 14:34:36 jperkin Exp $
#
# Init script for mysqld.
#
. /lib/svc/share/smf_include.sh
PIDFILE="@MYSQL_DATADIR@/mysql.pid"
ulimit -n 10240
case "$1" in
start)
@LOCALBASE@/sbin/mysqld --user=mysql \
--basedir=@LOCALBASE@ \
--datadir=@MYSQL_DATADIR@ \
--pid-file=${PIDFILE} \
--log-error=@VARBASE@/log/mysql/error.log &
;;
stop)
[ -f ${PIDFILE} ] && kill `@HEAD@ -1 ${PIDFILE}`
;;
*)
echo "Usage: $0 {start|stop}" >&2
exit 1
;;
esac
exit $SMF_EXIT_OK

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.13 2014/02/13 07:49:56 adam Exp $
# $NetBSD: Makefile,v 1.14 2014/03/11 14:34:36 jperkin Exp $
PKGNAME= ${DISTNAME:S/-/-server-/}
SVR4_PKGNAME= mysqs
@ -45,6 +45,8 @@ PKG_HOME.${MYSQL_USER}= ${MYSQL_DATADIR}
PKG_SHELL.${MYSQL_USER}= ${SH}
RCD_SCRIPTS= mysqld
SMF_NAME= mysql
SMF_METHODS= ${RCD_SCRIPTS}
FILES_SUBST+= HOSTNAME_CMD=${HOSTNAME_CMD:Q}
FILES_SUBST+= MYSQL_DATADIR=${MYSQL_DATADIR}

View file

@ -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='fs' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='net' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/loopback' />
</dependency>
<method_context project='mysql' working_directory='@MYSQL_DATADIR@'>
<method_credential user='@MYSQL_USER@' group='@MYSQL_GROUP@' />
<method_environment>
<envvar name='LD_PRELOAD_32' value='/usr/lib/extendedFILE.so.1' />
</method_environment>
</method_context>
<exec_method name='start' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.mysql@ start' timeout_seconds='18446744073709551615' />
<exec_method name='stop' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.mysql@ stop' timeout_seconds='18446744073709551615' />
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>MySQL RDBMS</loctext>
</common_name>
<documentation>
<manpage title='MySQL 5.6' section='1' />
<doc_link name='mysql.com' uri='http://dev.mysql.com/docs' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,31 @@
#!@SMF_METHOD_SHELL@
#
# $NetBSD: mysqld.sh,v 1.1 2014/03/11 14:34:36 jperkin Exp $
#
# Init script for mysqld.
#
. /lib/svc/share/smf_include.sh
PIDFILE="@MYSQL_DATADIR@/mysql.pid"
ulimit -n 10240
case "$1" in
start)
@LOCALBASE@/sbin/mysqld --user=mysql \
--basedir=@LOCALBASE@ \
--datadir=@MYSQL_DATADIR@ \
--pid-file=${PIDFILE} \
--log-error=@VARBASE@/log/mysql/error.log &
;;
stop)
[ -f ${PIDFILE} ] && kill `@HEAD@ -1 ${PIDFILE}`
;;
*)
echo "Usage: $0 {start|stop}" >&2
exit 1
;;
esac
exit $SMF_EXIT_OK

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.25 2014/02/23 11:25:51 adam Exp $
# $NetBSD: Makefile,v 1.26 2014/03/11 14:34:37 jperkin Exp $
PKGNAME= ${DISTNAME:C/-/84-server-/}
COMMENT= PostgreSQL database server programs
@ -60,6 +60,8 @@ PKG_GECOS.${PGUSER}= PostgreSQL database administrator
PKG_HOME.${PGUSER}= ${PGHOME}
RCD_SCRIPTS= pgsql
SMF_METHODS= postgresql
SMF_NAME= postgresql
.include "../../databases/postgresql84-client/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"

View file

@ -0,0 +1,37 @@
<?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'>
<dependency name='network' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/milestone/network:default' />
</dependency>
<dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<method_context project='postgres'>
<method_credential user='@PGUSER@' group='@PGGROUP@' />
<method_environment>
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
</method_environment>
</method_context>
<instance name='@SMF_INSTANCE@' enabled='false'>
<exec_method type='method' name='start' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ start' timeout_seconds='300' />
<exec_method type='method' name='stop' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ stop' timeout_seconds='300' />
<exec_method type='method' name='refresh' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ refresh' timeout_seconds='60' />
<property_group name='config' type='application'>
<propval name='data' type='astring' value='@PGHOME@/data84' />
<propval name='log' type='astring' value='@PGLOGFILE@' />
</property_group>
</instance>
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>PostgreSQL RDBMS</loctext>
</common_name>
<documentation>
<manpage title='postgres' section='1M' />
<doc_link name='postgresql.org' uri='http://postgresql.org' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,57 @@
#!/sbin/sh
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E SMI"
. /lib/svc/share/smf_include.sh
# SMF_FMRI is the name of the target service. This allows multiple instances
# to use the same script.
getproparg()
{ val=`svcprop -p $1 $SMF_FMRI`
[ -n "$val" ] && echo $val
}
PGBIN=@PREFIX@/bin
PGDATA=`getproparg config/data`
PGLOG=`getproparg config/log`
if [ -z $SMF_FMRI ]; then
echo "SMF framework variables are not initialized."
exit $SMF_EXIT_ERR
fi
if [ -z $PGDATA ]; then
echo "postgresql/data property not set"
exit $SMF_EXIT_ERR_CONFIG
fi
if [ -z $PGLOG ]; then
echo "postgresql/log property not set"
exit $SMF_EXIT_ERR_CONFIG
fi
case "$1" in
'start')
ulimit -n 10240
$PGBIN/pg_ctl -D $PGDATA -l $PGLOG start
;;
'stop')
$PGBIN/pg_ctl -D $PGDATA stop
;;
'refresh')
$PGBIN/pg_ctl -D $PGDATA reload
;;
*)
echo $"Usage: $0 {start|refresh}"
exit 1
;;
esac
exit $SMF_EXIT_OK

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.20 2014/02/23 11:25:51 adam Exp $
# $NetBSD: Makefile,v 1.21 2014/03/11 14:34:37 jperkin Exp $
PKGNAME= ${DISTNAME:C/-/90-server-/}
COMMENT= PostgreSQL database server programs
@ -63,6 +63,8 @@ PKG_GECOS.${PGUSER}= PostgreSQL database administrator
PKG_HOME.${PGUSER}= ${PGHOME}
RCD_SCRIPTS= pgsql
SMF_NAME= postgresql
SMF_METHODS= postgresql
.include "../../databases/postgresql90-client/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"

View file

@ -0,0 +1,37 @@
<?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='none' type='service'>
<service_fmri value='svc:/milestone/network:default' />
</dependency>
<dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<method_context project='postgres'>
<method_credential user='@PGUSER@' group='@PGGROUP@' />
<method_environment>
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
</method_environment>
</method_context>
<exec_method type='method' name='start' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ start' timeout_seconds='300' />
<exec_method type='method' name='stop' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ stop' timeout_seconds='300' />
<exec_method type='method' name='refresh' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ refresh' timeout_seconds='60' />
<property_group name='config' type='application'>
<propval name='data' type='astring' value='@PGDATA@' />
<propval name='log' type='astring' value='@PGLOGFILE@' />
</property_group>
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>PostgreSQL RDBMS</loctext>
</common_name>
<documentation>
<manpage title='postgres' section='1M' />
<doc_link name='postgresql.org' uri='http://postgresql.org' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,57 @@
#!/sbin/sh
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E SMI"
. /lib/svc/share/smf_include.sh
# SMF_FMRI is the name of the target service. This allows multiple instances
# to use the same script.
getproparg()
{ val=`svcprop -p $1 $SMF_FMRI`
[ -n "$val" ] && echo $val
}
PGBIN=@PREFIX@/bin
PGDATA=`getproparg config/data`
PGLOG=`getproparg config/log`
if [ -z $SMF_FMRI ]; then
echo "SMF framework variables are not initialized."
exit $SMF_EXIT_ERR
fi
if [ -z $PGDATA ]; then
echo "postgresql/data property not set"
exit $SMF_EXIT_ERR_CONFIG
fi
if [ -z $PGLOG ]; then
echo "postgresql/log property not set"
exit $SMF_EXIT_ERR_CONFIG
fi
case "$1" in
'start')
ulimit -n 10240
$PGBIN/pg_ctl -D $PGDATA -l $PGLOG start
;;
'stop')
$PGBIN/pg_ctl -D $PGDATA stop
;;
'refresh')
$PGBIN/pg_ctl -D $PGDATA reload
;;
*)
echo $"Usage: $0 {start|refresh}"
exit 1
;;
esac
exit $SMF_EXIT_OK

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.11 2014/02/23 11:25:52 adam Exp $
# $NetBSD: Makefile,v 1.12 2014/03/11 14:34:37 jperkin Exp $
PKGNAME= ${DISTNAME:C/-/91-server-/}
COMMENT= PostgreSQL database server programs
@ -63,6 +63,8 @@ PKG_GECOS.${PGUSER}= PostgreSQL database administrator
PKG_HOME.${PGUSER}= ${PGHOME}
RCD_SCRIPTS= pgsql
SMF_METHODS= postgresql
SMF_NAME= postgresql
.include "../../databases/postgresql91-client/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"

View file

@ -0,0 +1,37 @@
<?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='none' type='service'>
<service_fmri value='svc:/milestone/network:default' />
</dependency>
<dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<method_context project='postgres'>
<method_credential user='@PGUSER@' group='@PGGROUP@' />
<method_environment>
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
</method_environment>
</method_context>
<exec_method type='method' name='start' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ start' timeout_seconds='300' />
<exec_method type='method' name='stop' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ stop' timeout_seconds='300' />
<exec_method type='method' name='refresh' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ refresh' timeout_seconds='60' />
<property_group name='config' type='application'>
<propval name='data' type='astring' value='@PGHOME@/data' />
<propval name='log' type='astring' value='@VARBASE@/log/postgresql.log' />
</property_group>
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>PostgreSQL RDBMS</loctext>
</common_name>
<documentation>
<manpage title='postgres' section='1M' />
<doc_link name='postgresql.org' uri='http://postgresql.org' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,57 @@
#!/sbin/sh
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E SMI"
. /lib/svc/share/smf_include.sh
# SMF_FMRI is the name of the target service. This allows multiple instances
# to use the same script.
getproparg()
{ val=`svcprop -p $1 $SMF_FMRI`
[ -n "$val" ] && echo $val
}
PGBIN=@PREFIX@/bin
PGDATA=`getproparg config/data`
PGLOG=`getproparg config/log`
if [ -z $SMF_FMRI ]; then
echo "SMF framework variables are not initialized."
exit $SMF_EXIT_ERR
fi
if [ -z $PGDATA ]; then
echo "postgresql/data property not set"
exit $SMF_EXIT_ERR_CONFIG
fi
if [ -z $PGLOG ]; then
echo "postgresql/log property not set"
exit $SMF_EXIT_ERR_CONFIG
fi
case "$1" in
'start')
ulimit -n 10240
$PGBIN/pg_ctl -D $PGDATA -l $PGLOG start
;;
'stop')
$PGBIN/pg_ctl -D $PGDATA stop
;;
'refresh')
$PGBIN/pg_ctl -D $PGDATA reload
;;
*)
echo $"Usage: $0 {start|refresh}"
exit 1
;;
esac
exit $SMF_EXIT_OK

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.9 2014/02/23 11:25:53 adam Exp $
# $NetBSD: Makefile,v 1.10 2014/03/11 14:34:37 jperkin Exp $
PKGNAME= ${DISTNAME:C/-/92-server-/}
COMMENT= PostgreSQL database server programs
@ -63,6 +63,8 @@ PKG_GECOS.${PGUSER}= PostgreSQL database administrator
PKG_HOME.${PGUSER}= ${PGHOME}
RCD_SCRIPTS= pgsql
SMF_METHODS= postgresql
SMF_NAME= postgresql
.include "../../databases/postgresql92-client/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"

View file

@ -0,0 +1,37 @@
<?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='none' type='service'>
<service_fmri value='svc:/milestone/network:default' />
</dependency>
<dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<method_context project='postgres'>
<method_credential user='@PGUSER@' group='@PGGROUP@' />
<method_environment>
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
</method_environment>
</method_context>
<exec_method type='method' name='start' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ start' timeout_seconds='300' />
<exec_method type='method' name='stop' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ stop' timeout_seconds='300' />
<exec_method type='method' name='refresh' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ refresh' timeout_seconds='60' />
<property_group name='config' type='application'>
<propval name='data' type='astring' value='@PGHOME@/data' />
<propval name='log' type='astring' value='@VARBASE@/log/postgresql.log' />
</property_group>
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>PostgreSQL RDBMS</loctext>
</common_name>
<documentation>
<manpage title='postgres' section='1M' />
<doc_link name='postgresql.org' uri='http://postgresql.org' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,57 @@
#!/sbin/sh
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E SMI"
. /lib/svc/share/smf_include.sh
# SMF_FMRI is the name of the target service. This allows multiple instances
# to use the same script.
getproparg()
{ val=`svcprop -p $1 $SMF_FMRI`
[ -n "$val" ] && echo $val
}
PGBIN=@PREFIX@/bin
PGDATA=`getproparg config/data`
PGLOG=`getproparg config/log`
if [ -z $SMF_FMRI ]; then
echo "SMF framework variables are not initialized."
exit $SMF_EXIT_ERR
fi
if [ -z $PGDATA ]; then
echo "postgresql/data property not set"
exit $SMF_EXIT_ERR_CONFIG
fi
if [ -z $PGLOG ]; then
echo "postgresql/log property not set"
exit $SMF_EXIT_ERR_CONFIG
fi
case "$1" in
'start')
ulimit -n 10240
$PGBIN/pg_ctl -D $PGDATA -l $PGLOG start
;;
'stop')
$PGBIN/pg_ctl -D $PGDATA stop
;;
'refresh')
$PGBIN/pg_ctl -D $PGDATA reload
;;
*)
echo $"Usage: $0 {start|refresh}"
exit 1
;;
esac
exit $SMF_EXIT_OK

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.4 2014/02/23 11:25:54 adam Exp $
# $NetBSD: Makefile,v 1.5 2014/03/11 14:34:37 jperkin Exp $
PKGNAME= ${DISTNAME:C/-/93-server-/}
COMMENT= PostgreSQL database server programs
@ -63,6 +63,8 @@ PKG_GECOS.${PGUSER}= PostgreSQL database administrator
PKG_HOME.${PGUSER}= ${PGHOME}
RCD_SCRIPTS= pgsql
SMF_METHODS= postgresql
SMF_NAME= postgresql
.include "../../databases/postgresql93-client/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"

View file

@ -0,0 +1,37 @@
<?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='none' type='service'>
<service_fmri value='svc:/milestone/network:default' />
</dependency>
<dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<method_context project='postgres'>
<method_credential user='@PGUSER@' group='@PGGROUP@' />
<method_environment>
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
</method_environment>
</method_context>
<exec_method type='method' name='start' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ start' timeout_seconds='300' />
<exec_method type='method' name='stop' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ stop' timeout_seconds='300' />
<exec_method type='method' name='refresh' exec='@PREFIX@/@SMF_METHOD_FILE.postgresql@ refresh' timeout_seconds='60' />
<property_group name='config' type='application'>
<propval name='data' type='astring' value='@PGHOME@/data' />
<propval name='log' type='astring' value='@VARBASE@/log/postgresql.log' />
</property_group>
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>PostgreSQL RDBMS</loctext>
</common_name>
<documentation>
<manpage title='postgres' section='1M' />
<doc_link name='postgresql.org' uri='http://postgresql.org' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,57 @@
#!/sbin/sh
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E SMI"
. /lib/svc/share/smf_include.sh
# SMF_FMRI is the name of the target service. This allows multiple instances
# to use the same script.
getproparg()
{ val=`svcprop -p $1 $SMF_FMRI`
[ -n "$val" ] && echo $val
}
PGBIN=@PREFIX@/bin
PGDATA=`getproparg config/data`
PGLOG=`getproparg config/log`
if [ -z $SMF_FMRI ]; then
echo "SMF framework variables are not initialized."
exit $SMF_EXIT_ERR
fi
if [ -z $PGDATA ]; then
echo "postgresql/data property not set"
exit $SMF_EXIT_ERR_CONFIG
fi
if [ -z $PGLOG ]; then
echo "postgresql/log property not set"
exit $SMF_EXIT_ERR_CONFIG
fi
case "$1" in
'start')
ulimit -n 10240
$PGBIN/pg_ctl -D $PGDATA -l $PGLOG start
;;
'stop')
$PGBIN/pg_ctl -D $PGDATA stop
;;
'refresh')
$PGBIN/pg_ctl -D $PGDATA reload
;;
*)
echo $"Usage: $0 {start|refresh}"
exit 1
;;
esac
exit $SMF_EXIT_OK

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.6 2014/03/10 13:24:13 fhajny Exp $
# $NetBSD: Makefile,v 1.7 2014/03/11 14:34:37 jperkin Exp $
DISTNAME= redis-2.8.7
CATEGORIES= databases
@ -42,6 +42,8 @@ PKG_GECOS.${REDIS_USER}= Redis daemon user
PKG_HOME.${REDIS_USER}= ${REDIS_DBDIR}
FILES_SUBST+= REDIS_USER=${REDIS_USER}
FILES_SUBST+= REDIS_GROUP=${REDIS_GROUP}
FILES_SUBST+= REDIS_DATADIR=${REDIS_DATADIR}
SUBST_CLASSES+= fix-paths
SUBST_STAGE.fix-paths= post-patch

View file

@ -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="@REDIS_DATADIR@">
<method_credential user="@REDIS_USER@" group="@REDIS_GROUP@" />
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/bin/redis-server %{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@/redis.conf" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Redis server</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.36 2014/02/12 23:17:49 tron Exp $
# $NetBSD: Makefile,v 1.37 2014/03/11 14:34:37 jperkin Exp $
DISTNAME= memcached-1.4.17
PKGREVISION= 1
@ -29,6 +29,7 @@ PKG_USERS= ${MEMCACHED_USER}:${MEMCACHED_GROUP}
PKG_GROUPS_VARS+= MEMCACHED_GROUP
PKG_USERS_VARS+= MEMCACHED_USER
FILES_SUBST+= MEMCACHED_USER=${MEMCACHED_USER}
FILES_SUBST+= MEMCACHED_GROUP=${MEMCACHED_GROUP}
TEST_TARGET= test

View file

@ -0,0 +1,34 @@
<?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='loopback' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/network/loopback:default' />
</dependency>
<exec_method name='start' type='method' exec='@PREFIX@/bin/memcached -d -u %{config/user} -l %{config/listen_ip} -m %{config/memory}' timeout_seconds='30'>
<method_context>
<method_environment>
<envvar name='EVENT_NOEVPORT' value='1' />
<envvar name='EVENT_SHOW_METHOD' value='1' />
</method_environment>
</method_context>
</exec_method>
<exec_method name='stop' type='method' exec=':kill' timeout_seconds='30' />
<property_group name='config' type='application'>
<propval name='listen_ip' type='astring' value='127.0.0.1' />
<propval name='user' type='astring' value='@MEMCACHED_USER@' />
<propval name='memory' type='integer' value='64' />
</property_group>
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>memcached</loctext>
</common_name>
<documentation>
<doc_link name='memcached Official' uri='http://www.danga.com/memcached/' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.60 2014/02/12 23:18:05 tron Exp $
# $NetBSD: Makefile,v 1.61 2014/03/11 14:34:37 jperkin Exp $
DISTNAME= otp_src_${DIST_VERSION_MAJOR}${DIST_VERSION_MINOR:D-${DIST_VERSION_MINOR}}
PKGREVISION= 2
@ -68,6 +68,8 @@ TEST_TARGET= tests
TEST_MAKE_FLAGS= ERL_TOP=${WRKSRC}
REPLACE_PERL+= make/make_emakefile
SMF_NAME= epmd
PLIST_SRC= PLIST
.if exists(${.CURDIR}/PLIST.${OPSYS})

View file

@ -0,0 +1,30 @@
<?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>
<method_credential user="nobody" group="nobody" />
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/lib/erlang/bin/epmd -daemon" 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"></property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Erlang Port Mapper Daemon</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.11 2013/12/09 14:17:48 obache Exp $
# $NetBSD: Makefile,v 1.12 2014/03/11 14:34:38 jperkin Exp $
DISTNAME= amavisd-new-${VERSION}${PATCHLEVEL}
PKGNAME= amavisd-new-${VERSION}${PATCHLEVEL:S/-//}
@ -75,6 +75,7 @@ OWN_DIRS_PERMS+= ${AMAVIS_DIR}/tmp ${AMAVIS_USER} ${AMAVIS_GROUP} 750
OWN_DIRS_PERMS+= ${AMAVIS_QUARANTINE} ${AMAVIS_USER} ${AMAVIS_GROUP} 750
RCD_SCRIPTS= amavisd
SMF_NAME= amavisd
CONF_FILES= ${EGDIR}/amavisd.conf-minimal ${PKG_SYSCONFDIR}/amavisd.conf
PKG_OPTIONS_VAR= PKG_OPTIONS.amavisd-new

View file

@ -0,0 +1,39 @@
<?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='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='loopback' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/network/loopback:default' />
</dependency>
<dependency name='physical' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/network/physical:default' />
</dependency>
<dependency name='name-services' grouping='require_all' restart_on='refresh' type='service'>
<service_fmri value='svc:/milestone/name-services' />
</dependency>
<dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/system-log' />
</dependency>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/amavisd start" timeout_seconds="60" />
<exec_method type="method" name="stop" exec="@PREFIX@/sbin/amavisd stop" timeout_seconds="120" />
<exec_method type="method" name="refresh" exec="@PREFIX@/sbin/amavisd reload" 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@/amavisd.conf" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Amavisd</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.78 2013/07/12 10:44:55 jperkin Exp $
# $NetBSD: Makefile,v 1.79 2014/03/11 14:34:38 jperkin Exp $
DISTNAME= courier-imap-4.10.0
PKGREVISION= 3
@ -52,6 +52,7 @@ CONF_FILES_PERMS+= ${EGDIR}/${_file_} \
${COURIER_FILE_PERMS}
.endfor
RCD_SCRIPTS= courierimap courierimaps courierpop courierpops
SMF_METHODS= courier-imap
SUBST_CLASSES+= courier
SUBST_FILES.courier= imap/imapd-ssl.dist.in imap/imapd.8.in \

View file

@ -0,0 +1,122 @@
#!@SMF_METHOD_SHELL@
#
# $NetBSD: courier-imap.sh,v 1.1 2014/03/11 14:34:38 jperkin Exp $
#
# Init script for Courier-IMAP.
#
. /lib/svc/share/smf_include.sh
prefix=@PREFIX@
exec_prefix=@PREFIX@
bindir=${exec_prefix}/bin
sbindir=${exec_prefix}/sbin
case "$1" in
start)
cd /
. $prefix/etc/courier/imapd
printf "Starting Courier-IMAP server:"
case x$IMAPDSTART in
x[yY]*)
# Start daemons.
$sbindir/imapd start
printf "\n imap"
;;
esac
. $prefix/etc/courier/imapd-ssl
case x$IMAPDSSLSTART in
x[yY]*)
if test -x $COURIERTLS
then
# First time we start this, generate a dummy SSL certificate.
if test ! -f $TLS_CERTFILE
then
printf "\n generating-SSL-certificate..."
$prefix/share/courier/mkimapdcert >/dev/null 2>&1
fi
$sbindir/imapd-ssl start
printf "\n imap-ssl"
fi
;;
esac
POP3DSTART=""
POP3DSSLSTART=""
if test -f $prefix/etc/courier/pop3d
then
. $prefix/etc/courier/pop3d
fi
case x$POP3DSTART in
x[yY]*)
# Start daemons.
$sbindir/pop3d start
printf "\n pop3"
;;
esac
if test -f $prefix/etc/courier/pop3d-ssl
then
. $prefix/etc/courier/pop3d-ssl
fi
case x$POP3DSSLSTART in
x[yY]*)
if test -x $COURIERTLS
then
# First time we start this, generate a dummy SSL certificate.
if test ! -f $TLS_CERTFILE
then
printf "\n generating-SSL-certificate..."
$prefix/share/courier/mkpop3dcert >/dev/null 2>&1
fi
$sbindir/pop3d-ssl start
printf "\n pop3-ssl"
fi
;;
esac
echo ""
;;
stop)
printf "Stopping Courier-IMAP server:"
. $prefix/etc/courier/imapd
. $prefix/etc/courier/imapd-ssl
$sbindir/imapd stop
printf "\n imap"
if test -x $COURIERTLS
then
$sbindir/imapd-ssl stop
printf "\n imap-ssl"
fi
if test -f $prefix/etc/courier/pop3d
then
$sbindir/pop3d stop
printf "\n pop3"
if test -x $COURIERTLS
then
$sbindir/pop3d-ssl stop
printf "\n pop3-ssl"
fi
fi
echo ""
;;
restart)
$0 stop
sleep 3
$0 start
;;
esac
exit 0

View file

@ -0,0 +1,43 @@
<?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'>
<dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/service' />
</dependency>
<dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/system-log' />
</dependency>
<instance name='@SMF_INSTANCE@' enabled='false'>
<dependency name='config-files' grouping='require_any' restart_on='refresh' type='path'>
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/pop3d-ssl' />
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/pop3d' />
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/imapd-ssl' />
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/imapd' />
</dependency>
<dependency name='authlib' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/@SMF_PREFIX@/courier:authlib' />
</dependency>
<exec_method name='start' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.courier-imap@ start' timeout_seconds='120' />
<exec_method name='stop' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.courier-imap@ stop' timeout_seconds='60' />
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal' />
</property_group>
<property_group name='general' type='framework'>
<propval name='action_authorization' type='astring' value='solaris.smf.manage.courier-imap' />
</property_group>
<template>
<common_name>
<loctext xml:lang='C'>imap - Courier IMAP provides access to Maildirs</loctext>
</common_name>
<documentation>
<manpage title='imapd' section='8' manpath='@PREFIX@/@PKGMANDIR@' />
</documentation>
</template>
</instance>
<stability value='Evolving' />
</service>
</service_bundle>

View file

@ -0,0 +1,34 @@
<?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>
<method_environment>
<envvar name="MASTER_IS_PARENT_ENV" value="1" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/dovecot" 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@/dovecot/dovecot.conf" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Dovecot IMAP Server</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.59 2014/02/19 15:29:23 taca Exp $
# $NetBSD: Makefile,v 1.60 2014/03/11 14:34:38 jperkin Exp $
DISTNAME= dovecot-2.2.12
CATEGORIES= mail
@ -21,6 +21,7 @@ CONFIGURE_ARGS+= --with-ssldir=${SSLDIR}
.include "../../mk/bsd.prefs.mk"
RCD_SCRIPTS= dovecot
SMF_NAME= dovecot
DOVECOT_USER?= dovecot
DOVECOT_GROUP?= dovecot

View file

@ -0,0 +1,34 @@
<?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>
<method_environment>
<envvar name="MASTER_IS_PARENT_ENV" value="1" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/dovecot" 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@/dovecot/dovecot.conf" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Dovecot IMAP Server</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,27 @@
<?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></method_context>
<exec_method type="method" name="start" exec="@PREFIX@/lib/mailman/bin/mailmanctl -s start" timeout_seconds="60" />
<exec_method type="method" name="stop" exec="@PREFIX@/lib/mailman/bin/mailmanctl stop" 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>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Mailman Master</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,43 @@
<?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='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='loopback' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/network/loopback:default' />
</dependency>
<dependency name='physical' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/network/physical:default' />
</dependency>
<dependency name='name-services' grouping='require_all' restart_on='refresh' type='service'>
<service_fmri value='svc:/milestone/name-services' />
</dependency>
<dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/system-log' />
</dependency>
<dependency name='config-files' grouping='require_all' restart_on='refresh' type='path'>
<service_fmri value='file://@PKG_SYSCONFDIR@/main.cf' />
<service_fmri value='file://@PKG_SYSCONFDIR@/master.cf' />
</dependency>
<exec_method name='start' type='method' exec='@PREFIX@/sbin/postfix start' timeout_seconds='60' />
<exec_method name='stop' type='method' exec='@PREFIX@/sbin/postfix stop' timeout_seconds='60' />
<exec_method name='refresh' type='method' exec='@PREFIX@/sbin/postfix reload' timeout_seconds='60' />
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal' />
</property_group>
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>Postfix SMTP Server</loctext>
</common_name>
<documentation>
<manpage title='postfix' section='1' />
<doc_link name='postfix.org' uri='http://www.postfix.org/documentation.html' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.39 2013/08/21 16:15:58 wiz Exp $
# $NetBSD: Makefile,v 1.40 2014/03/11 14:34:38 jperkin Exp $
DISTNAME= postgrey-1.34
CATEGORIES= mail
@ -47,6 +47,9 @@ OWN_DIRS_PERMS+= ${POSTGREY_DBDIR} \
${POSTGREY_USER} ${POSTGREY_GROUP} 0775
FILES_SUBST+= PERL=${PERL5:Q}
FILES_SUBST+= POSTGREY_USER=${POSTGREY_USER}
FILES_SUBST+= POSTGREY_GROUP=${POSTGREY_GROUP}
FILES_SUBST+= POSTGREY_DBDIR=${POSTGREY_DBDIR}
SUBST_CLASSES+= postgrey
SUBST_STAGE.postgrey= pre-build

View file

@ -0,0 +1,51 @@
<?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='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='loopback' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/network/loopback:default' />
</dependency>
<dependency name='physical' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/network/physical:default' />
</dependency>
<dependency name='name-services' grouping='require_all' restart_on='refresh' type='service'>
<service_fmri value='svc:/milestone/name-services' />
</dependency>
<dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/system-log' />
</dependency>
<dependency name='config-file' grouping='require_all' restart_on='none' type='path'>
<service_fmri value='file://@PKG_SYSCONFDIR@/postgrey_whitelist_clients' />
</dependency>
<method_context working_directory='@POSTGREY_DBDIR@'>
<method_credential user='@POSTGREY_USER@' group='@POSTGREY_GROUP@' />
</method_context>
<exec_method name='start' type='method' exec='@PREFIX@/sbin/postgrey --daemonize --privacy --inet=%{postgrey/port} %{postgrey/targrey} --tarpit=%{postgrey/tarpit} --pidfile=@POSTGREY_DBDIR@/postgrey.pid --greylist-action=%{postgrey/action} --greylist-text=%{postgrey/text} --delay=%{postgrey/delay} --max-age=%{postgrey/maxage} --retry-window=%{postgrey/retry}' timeout_seconds='30' />
<exec_method name='stop' type='method' exec=':kill' timeout_seconds='30' />
<property_group name='postgrey' type='application'>
<propval name='port' type='integer' value='10025'/>
<propval name='targrey' type='astring' value='--targrey'/>
<propval name='tarpit' type='integer' value='35'/>
<propval name='maxage' type='integer' value='35'/>
<propval name='delay' type='integer' value='300'/>
<propval name='retry' type='integer' value='2'/>
<propval name='action' type='astring' value='DEFER_IF_PERMIT'/>
<propval name='text' type='astring' value='Policy restrictions; try later'/>
</property_group>
<stability value='Unstable' />
<template>
<common_name>
<loctext xml:lang='C'>Postgrey Greylisting for Postfix</loctext>
</common_name>
<documentation>
<manpage title='postgrey' section='1' />
<doc_link name='postgrey website' uri='http://postgrey.schweikert.ch' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,41 @@
<?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='0'>
<create_default_instance enabled="false" />
<single_instance />
<dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='loopback' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/network/loopback:default' />
</dependency>
<dependency name='physical' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/network/physical:default' />
</dependency>
<dependency name='name-services' grouping='require_all' restart_on='refresh' type='service'>
<service_fmri value='svc:/milestone/name-services' />
</dependency>
<dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/system-log' />
</dependency>
<dependency name='config-files' grouping='require_all' restart_on='refresh' type='path'>
<service_fmri value='file:///etc/mail/sendmail.cf' />
</dependency>
<exec_method name='start' type='method' exec='@PREFIX@/libexec/sendmail/sendmail -Lsm-mta -bd -q30m' timeout_seconds='60' />
<exec_method name='stop' type='method' exec=':kill' timeout_seconds='60' />
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal' />
</property_group>
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>Sendmail SMTP Server</loctext>
</common_name>
<documentation>
<manpage title='sendmail' section='8' />
<doc_link name='sendmail.com' uri='http://www.sendmail.com/sm/open_source/docs/' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.36 2014/02/12 23:18:19 tron Exp $
# $NetBSD: Makefile,v 1.37 2014/03/11 14:34:38 jperkin Exp $
DISTNAME= bind-${BIND_VERSION}
PKGNAME= ${DISTNAME:S/-P/pl/}
@ -69,6 +69,7 @@ PLIST.inet6= yes
.endif
RCD_SCRIPTS= lwresd named9
SMF_METHODS= named
INSTALLATION_DIRS= ${DOCDIR} share/doc/bind9/arm share/doc/bind9/misc

View file

@ -0,0 +1,141 @@
<?xml version="1.0"?>
<!--
CDDL HEADER START
The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at usr/src/OPENSOLARIS.LICENSE.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]
CDDL HEADER END
-->
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
Copyright 2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
ident "@(#)server.xml 1.8 07/06/19 SMI"
-->
<!-- Portions Copyright 2007 Vedran Bender -->
<service_bundle type='manifest' name='@SMF_NAME@'>
<service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
<dependency name='filesystem_minimal' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='loopback' grouping='require_any' restart_on='error' type='service'>
<service_fmri value='svc:/network/loopback' />
</dependency>
<dependency name='network' grouping='optional_all' restart_on='error' type='service'>
<service_fmri value='svc:/milestone/network' />
</dependency>
<dependency name='config-files' grouping='require_any' restart_on='refresh' type='path'>
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/named.conf' />
</dependency>
<exec_method type='method' name='stop' exec=':kill' timeout_seconds='60' />
<!--
In order to run multiple named(1M) processes with their own
configuration file or properties each must have a unique
instance.
-->
<instance name='default' enabled='false'>
<exec_method type='method' name='start' exec='@PREFIX@/@SMF_METHOD_FILE.named@ %m %i' timeout_seconds='60'>
<method_context>
<!--
privileges: (see privileges(5) and /etc/security/priv_names)
file_dac_read, file_dac_search:
Necessary for reading the configuration file
even it is restricted by the file permission.
net_privaddr:
Bind to a privileged port number.
sys_resource:
Permit the setting of resource limits (eg. stack
size).
proc_chroot:
Permit use of chroot(2).
-->
<method_credential user='root' group='root' privileges='basic,!proc_session,!proc_info,!file_link_any,net_privaddr,file_dac_read,file_dac_search,sys_resource,proc_chroot' />
</method_context>
</exec_method>
<!--
SIGHUP causes named to reread its configuration file, but not any
of the properties below.
-->
<exec_method type='method' name='refresh' exec=':kill -HUP' timeout_seconds='60'>
<method_context />
</exec_method>
<property_group name='general' type='framework'>
<!-- manage DNS server state -->
<propval name='action_authorization' type='astring' value='solaris.smf.manage.bind' />
<propval name='value_authorization' type='astring' value='solaris.smf.manage.bind' />
</property_group>
<!-- Default property settings for named(1M) instance. -->
<property_group name='options' type='application'>
<!--
server: specifies an alternative server command. If
not specified the default /usr/sbin/named is used.
-->
<propval name='server' type='astring' value='' />
<!--
configuration_file: specifies an alternative
configuration file to be used. The property is similar
to named(1M) command line option '-c'
-->
<propval name='configuration_file' type='astring' value='' />
<!--
ip_interfaces: specifies which IP transport BIND will
transmit on. Possible values are 'IPv4' or 'IPv6'. Any
other setting assumes 'all', the default.
Equivalent command line option '-4' or '-6'.
-->
<propval name='ip_interfaces' type='astring' value='all' />
<!--
listen_on_port: Specifies the default UDP and TCP port
which will be used to listen for DNS requests.
Equivalent command line option '-p <integer>'.
-->
<propval name='listen_on_port' type='integer' value='0' />
<!--
debug_level: Specifies the default debug level. The
default is 0; no debugging. The Higher the number the
more verbose debug information becomes.
Equivalent command line option '-d <integer>'.
-->
<propval name='debug_level' type='integer' value='0' />
<!--
threads: Specifies the number of cpu worker threads to
create. The default of 0 causes named to try and
determine the number of CPUs present and create one
thread per CPU.
Equivalent command line option '-n <integer>'.
-->
<propval name='threads' type='integer' value='0' />
<!--
chroot_dir: Change the root directory using chroot(2)
to directory after processing the command line
arguments, but before reading the configuration file.
Equivalent command line option '-t <pathname>'.
-->
<propval name='chroot_dir' type='astring' value='' />
</property_group>
</instance>
<stability value='Unstable' />
<template>
<common_name>
<loctext xml:lang='C'>BIND DNS server</loctext>
</common_name>
<documentation>
<manpage title='named' section='1M' manpath='@PREFIX@/@PKGMANDIR@' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,117 @@
#!@SMF_METHOD_SHELL@
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#pragma ident "@(#)dns-server.sh 1.1 07/03/26 SMI"
# smf_method(5) start/stop script required for server DNS
. /lib/svc/share/smf_include.sh
result=${SMF_EXIT_OK}
# Read command line arguments
method="$1" # %m
instance="$2" # %i
# Set defaults; SMF_FMRI should have been set, but just in case.
if [ -z "$SMF_FMRI" ]; then
SMF_FMRI="svc:/@SMF_PREFIX@/@SMF_NAME@:${instance}"
fi
server="@PREFIX@/sbin/named"
I=`/usr/bin/basename $0`
case "$method" in
'start')
cmdopts=""
properties="debug_level ip_interfaces listen_on_port
threads chroot_dir configuration_file server"
for prop in $properties
do
value=`/usr/bin/svcprop -p options/${prop} ${SMF_FMRI}`
if [ -z "${value}" -o "${value}" = '""' ]; then
continue;
fi
case $prop in
'debug_level')
if [ ${value} -gt 0 ]; then
cmdopts="${cmdopts} -d ${value}"
fi
;;
'ip_interfaces')
case ${value} in
'IPv4')
cmdopts="${cmdopts} -4";;
'IPv6')
cmdopts="${cmdopts} -6";;
'all')
: # Default is all, therefore ignore.
;;
*)
echo "$I: Unrecognised value in service instance property" >&2
echo "$I: options/${prop} : ${value}" >&2
;;
esac
;;
'listen_on_port')
if [ ${value} -gt 0 ]; then
cmdopts="${cmdopts} -p ${value}"
fi
;;
'threads')
if [ ${value} -gt 0 ]; then
cmdopts="${cmdopts} -n ${value}"
fi
;;
'chroot_dir')
cmdopts="${cmdopts} -t ${value}"
;;
'configuration_file')
cmdopts="${cmdopts} -c ${value}"
;;
'server')
set -- `echo ${value} | /usr/bin/sed -e 's/\\\\//g'`
server=$@
;;
esac
done
if [ ${result} = ${SMF_EXIT_OK} ]; then
echo "$I: Executing: ${server} ${cmdopts}"
# Execute named(1M) with relevant command line options.
${server} ${cmdopts}
result=$?
fi
;;
'stop')
smf_kill_contract ${contract} TERM 1
[ $? -ne 0 ] && exit 1
;;
*)
echo "Usage: $I [stop|start] <instance>" >&2
exit 1
;;
esac
exit ${result}

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.33 2014/02/12 23:18:19 tron Exp $
# $NetBSD: Makefile,v 1.34 2014/03/11 14:34:38 jperkin Exp $
DISTNAME= bind-${BIND_VERSION}
PKGNAME= ${DISTNAME:S/-P/pl/}
@ -67,6 +67,7 @@ PLIST.inet6= yes
.endif
RCD_SCRIPTS= lwresd named9
SMF_METHODS= named
INSTALLATION_DIRS= ${DOCDIR} share/doc/bind9/arm

View file

@ -0,0 +1,141 @@
<?xml version="1.0"?>
<!--
CDDL HEADER START
The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at usr/src/OPENSOLARIS.LICENSE.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]
CDDL HEADER END
-->
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
Copyright 2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
ident "@(#)server.xml 1.8 07/06/19 SMI"
-->
<!-- Portions Copyright 2007 Vedran Bender -->
<service_bundle type='manifest' name='@SMF_NAME@'>
<service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
<dependency name='filesystem_minimal' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='loopback' grouping='require_any' restart_on='error' type='service'>
<service_fmri value='svc:/network/loopback' />
</dependency>
<dependency name='network' grouping='optional_all' restart_on='error' type='service'>
<service_fmri value='svc:/milestone/network' />
</dependency>
<dependency name='config-files' grouping='require_any' restart_on='refresh' type='path'>
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/named.conf' />
</dependency>
<exec_method type='method' name='stop' exec=':kill' timeout_seconds='60' />
<!--
In order to run multiple named(1M) processes with their own
configuration file or properties each must have a unique
instance.
-->
<instance name='default' enabled='false'>
<exec_method type='method' name='start' exec='@PREFIX@/@SMF_METHOD_FILE.named@ %m %i' timeout_seconds='60'>
<method_context>
<!--
privileges: (see privileges(5) and /etc/security/priv_names)
file_dac_read, file_dac_search:
Necessary for reading the configuration file
even it is restricted by the file permission.
net_privaddr:
Bind to a privileged port number.
sys_resource:
Permit the setting of resource limits (eg. stack
size).
proc_chroot:
Permit use of chroot(2).
-->
<method_credential user='root' group='root' privileges='basic,!proc_session,!proc_info,!file_link_any,net_privaddr,file_dac_read,file_dac_search,sys_resource,proc_chroot' />
</method_context>
</exec_method>
<!--
SIGHUP causes named to reread its configuration file, but not any
of the properties below.
-->
<exec_method type='method' name='refresh' exec=':kill -HUP' timeout_seconds='60'>
<method_context />
</exec_method>
<property_group name='general' type='framework'>
<!-- manage DNS server state -->
<propval name='action_authorization' type='astring' value='solaris.smf.manage.bind' />
<propval name='value_authorization' type='astring' value='solaris.smf.manage.bind' />
</property_group>
<!-- Default property settings for named(1M) instance. -->
<property_group name='options' type='application'>
<!--
server: specifies an alternative server command. If
not specified the default /usr/sbin/named is used.
-->
<propval name='server' type='astring' value='' />
<!--
configuration_file: specifies an alternative
configuration file to be used. The property is similar
to named(1M) command line option '-c'
-->
<propval name='configuration_file' type='astring' value='' />
<!--
ip_interfaces: specifies which IP transport BIND will
transmit on. Possible values are 'IPv4' or 'IPv6'. Any
other setting assumes 'all', the default.
Equivalent command line option '-4' or '-6'.
-->
<propval name='ip_interfaces' type='astring' value='all' />
<!--
listen_on_port: Specifies the default UDP and TCP port
which will be used to listen for DNS requests.
Equivalent command line option '-p <integer>'.
-->
<propval name='listen_on_port' type='integer' value='0' />
<!--
debug_level: Specifies the default debug level. The
default is 0; no debugging. The Higher the number the
more verbose debug information becomes.
Equivalent command line option '-d <integer>'.
-->
<propval name='debug_level' type='integer' value='0' />
<!--
threads: Specifies the number of cpu worker threads to
create. The default of 0 causes named to try and
determine the number of CPUs present and create one
thread per CPU.
Equivalent command line option '-n <integer>'.
-->
<propval name='threads' type='integer' value='0' />
<!--
chroot_dir: Change the root directory using chroot(2)
to directory after processing the command line
arguments, but before reading the configuration file.
Equivalent command line option '-t <pathname>'.
-->
<propval name='chroot_dir' type='astring' value='' />
</property_group>
</instance>
<stability value='Unstable' />
<template>
<common_name>
<loctext xml:lang='C'>BIND DNS server</loctext>
</common_name>
<documentation>
<manpage title='named' section='1M' manpath='@PREFIX@/@PKGMANDIR@' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,117 @@
#!@SMF_METHOD_SHELL@
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#pragma ident "@(#)dns-server.sh 1.1 07/03/26 SMI"
# smf_method(5) start/stop script required for server DNS
. /lib/svc/share/smf_include.sh
result=${SMF_EXIT_OK}
# Read command line arguments
method="$1" # %m
instance="$2" # %i
# Set defaults; SMF_FMRI should have been set, but just in case.
if [ -z "$SMF_FMRI" ]; then
SMF_FMRI="svc:/@SMF_PREFIX@/@SMF_NAME@:${instance}"
fi
server="@PREFIX@/sbin/named"
I=`/usr/bin/basename $0`
case "$method" in
'start')
cmdopts=""
properties="debug_level ip_interfaces listen_on_port
threads chroot_dir configuration_file server"
for prop in $properties
do
value=`/usr/bin/svcprop -p options/${prop} ${SMF_FMRI}`
if [ -z "${value}" -o "${value}" = '""' ]; then
continue;
fi
case $prop in
'debug_level')
if [ ${value} -gt 0 ]; then
cmdopts="${cmdopts} -d ${value}"
fi
;;
'ip_interfaces')
case ${value} in
'IPv4')
cmdopts="${cmdopts} -4";;
'IPv6')
cmdopts="${cmdopts} -6";;
'all')
: # Default is all, therefore ignore.
;;
*)
echo "$I: Unrecognised value in service instance property" >&2
echo "$I: options/${prop} : ${value}" >&2
;;
esac
;;
'listen_on_port')
if [ ${value} -gt 0 ]; then
cmdopts="${cmdopts} -p ${value}"
fi
;;
'threads')
if [ ${value} -gt 0 ]; then
cmdopts="${cmdopts} -n ${value}"
fi
;;
'chroot_dir')
cmdopts="${cmdopts} -t ${value}"
;;
'configuration_file')
cmdopts="${cmdopts} -c ${value}"
;;
'server')
set -- `echo ${value} | /usr/bin/sed -e 's/\\\\//g'`
server=$@
;;
esac
done
if [ ${result} = ${SMF_EXIT_OK} ]; then
echo "$I: Executing: ${server} ${cmdopts}"
# Execute named(1M) with relevant command line options.
${server} ${cmdopts}
result=$?
fi
;;
'stop')
smf_kill_contract ${contract} TERM 1
[ $? -ne 0 ] && exit 1
;;
*)
echo "Usage: $I [stop|start] <instance>" >&2
exit 1
;;
esac
exit ${result}

View file

@ -0,0 +1,38 @@
<?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='multi-user' grouping='require_all' restart_on='refresh' type='service'>
<service_fmri value='svc:/milestone/multi-user' />
</dependency>
<dependency name='config' grouping='require_all' restart_on='restart' type='path'>
<service_fmri value='file://@PKG_SYSCONFDIR@/dnsmasq.conf' />
</dependency>
<dependent name='dnsmasq_multi-user-server' grouping='optional_all' restart_on='none'>
<service_fmri value='svc:/milestone/multi-user-server' />
</dependent>
<exec_method type='method' name='start' exec='@PREFIX@/sbin/dnsmasq -C %{config_file}' timeout_seconds='60'>
<method_context>
<method_credential user='root' group='root' />
</method_context>
</exec_method>
<exec_method type='method' name='stop' exec=':kill' timeout_seconds='60' />
<exec_method type='method' name='refresh' exec=':kill -HUP' timeout_seconds='60' />
<property_group name="application" type="application">
<propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/dnsmasq.conf" />
</property_group>
<template>
<common_name>
<loctext xml:lang='C'>dnsmasq server</loctext>
</common_name>
<description>
<loctext xml:lang='C'>dnsmasq - A lightweight DHCP and caching DNS server.</loctext>
</description>
<documentation>
<manpage title='dnsmasq' section='8' manpath='@PREFIX@/@PKGMANDIR@' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,29 @@
<?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>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/haproxy -f %{config_file} -D" 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@/haproxy.cfg" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">HAProxy</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,30 @@
<?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>
<exec_method name='start' type='method' exec='@PREFIX@/sbin/mdnsd' timeout_seconds='60'/>
<exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'/>
<property_group name='application' type='application'/>
<property_group name='startd' type='framework'>
<propval name='duration' type='astring' value='contract'/>
<propval name='ignore_error' type='astring' value='core,signal'/>
</property_group>
<stability value='Evolving'/>
<template>
<common_name>
<loctext xml:lang='C'>Apple ease-of-use IP networking initiative</loctext>
</common_name>
<documentation>
<manpage title='mdnsd' section='8M'/>
</documentation>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.49 2013/09/04 12:31:26 obache Exp $
# $NetBSD: Makefile,v 1.50 2014/03/11 14:34:39 jperkin Exp $
#
DISTNAME= nagios-3.5.0
@ -35,7 +35,10 @@ USE_TOOLS+= mail:run perl
CONFIGURE_ARGS+= --with-mail=${TOOLS_PLATFORM.mail:Q}
RCD_SCRIPTS+= nagios
SMF_NAME= nagios
FILES_SUBST+= NAGIOS_USER=${NAGIOS_USER}
FILES_SUBST+= NAGIOS_GROUP=${NAGIOS_GROUP}
FILES_SUBST+= NAGIOSDIR=${NAGIOSDIR}
INSTALL_TARGET= install install-config

View file

@ -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="@NAGIOSDIR@">
<method_credential user="@NAGIOS_USER@" group="@NAGIOS_GROUP@" />
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/bin/nagios -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@/nagios.cfg" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Nagios monitoring</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.21 2014/02/12 23:18:23 tron Exp $
# $NetBSD: Makefile,v 1.22 2014/03/11 14:34:39 jperkin Exp $
#
DISTNAME= nrpe-2.12
@ -34,6 +34,10 @@ CONFIGURE_ARGS+= --with-nagios-group=${NAGIOS_GROUP:Q}
CONF_FILES+= ${PREFIX}/share/examples/nagios/nrpe.cfg ${PKG_SYSCONFDIR}/nrpe.cfg
RCD_SCRIPTS+= nrpe
SMF_NAME= nrpe
FILES_SUBST+= NAGIOS_USER=${NAGIOS_USER}
FILES_SUBST+= NAGIOS_GROUP=${NAGIOS_GROUP}
FILES_SUBST+= NAGIOSDIR=${NAGIOSDIR}
INSTALLATION_DIRS= sbin libexec/nagios share/examples/nagios

View file

@ -0,0 +1,33 @@
<?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="/tmp">
<method_credential user="@NAGIOS_USER@" group="@NAGIOS_GROUP@" />
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/nrpe -c %{config_file} -d" timeout_seconds="60" />
<exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
<exec_method type="method" name="refresh" exec=":kill -HUP" 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@/nrpe.cfg" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Nagios Remote Plug-In Executor (NRPE)</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.101 2014/02/12 23:18:23 tron Exp $
# $NetBSD: Makefile,v 1.102 2014/03/11 14:34:39 jperkin Exp $
DISTNAME= net-snmp-5.7.2
PKGREVISION= 6
@ -101,6 +101,7 @@ CONFIGURE_ARGS+= --enable-ucd-snmp-compatibility
#
REQD_DIRS= ${PREFIX}/share/snmp
RCD_SCRIPTS= snmpd snmptrapd
SMF_NAME= snmp
USE_TOOLS+= sh:run
REPLACE_INTERPRETER+= bash

View file

@ -0,0 +1,45 @@
<?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='milestone' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/milestone/sysconfig'/>
</dependency>
<dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local'/>
</dependency>
<dependency name='name-services' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/milestone/name-services'/>
</dependency>
<dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/system-log'/>
</dependency>
<dependency name='rstat' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/rpc/rstat'/>
</dependency>
<dependency name='cryptosvc' grouping='require_all' restart_on='restart' type='service'>
<service_fmri value='svc:/system/cryptosvc'/>
</dependency>
<dependency name='network' grouping='require_all' restart_on='restart' type='service'>
<service_fmri value='svc:/milestone/network'/>
</dependency>
<dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
<service_fmri value='file://localhost/@PKG_SYSCONFDIR@/snmpd.conf'/>
</dependency>
<exec_method name='start' type='method' exec='@PREFIX@/sbin/snmpd -c %{config_file}' timeout_seconds='60'/>
<exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'/>
<property_group name="application" type="application">
<propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/snmpd.conf" />
</property_group>
<template>
<common_name>
<loctext xml:lang='C'>net-snmp SNMP daemon</loctext>
</common_name>
<documentation>
<manpage title='snmpd' section='1M' manpath='@PREFIX@/@PKGMANDIR@/'/>
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,33 @@
<?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-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<dependency name='autofs' grouping='optional_all' restart_on='error' type='service'>
<service_fmri value='svc:/system/filesystem/autofs:default' />
</dependency>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/proftpd -c %{config_file}" timeout_seconds="60" />
<exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
<exec_method type="method" name="refresh" exec=":kill -HUP" 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@/proftpd.conf" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">ProFTPD FTP daemon</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.16 2014/03/10 11:18:41 fhajny Exp $
# $NetBSD: Makefile,v 1.17 2014/03/11 14:34:39 jperkin Exp $
PKGNAME= rabbitmq-${RMQ_VERSION}
DISTNAME= rabbitmq-server-${RMQ_VERSION}
@ -51,6 +51,10 @@ CONF_FILES+= share/examples/rabbitmq/rabbitmq-env.conf \
CONF_FILES+= share/examples/rabbitmq/rabbitmq.config.example \
${PKG_SYSCONFDIR}/rabbitmq.config
FILES_SUBST+= RMQ_USER=${RMQ_USER}
FILES_SUBST+= RMQ_GROUP=${RMQ_GROUP}
FILES_SUBST+= RMQ_DIR=${RMQ_DIR}
INSTALLATION_DIRS+= share/examples/rabbitmq
SCRIPTS_DIR= ${WRKSRC}/scripts

View file

@ -0,0 +1,36 @@
<?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>
<dependency name='@SMF_NAME@-epmd' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/@SMF_PREFIX@/epmd' />
</dependency>
<method_context>
<method_credential user="@RMQ_USER@" group="@RMQ_GROUP@" />
<method_environment>
<envvar name="HOME" value="@RMQ_DIR@" />
<envvar name="PATH" value="@PREFIX@/sbin:@PREFIX@/bin:/sbin:/usr/sbin:/usr/bin" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/rabbitmq-server" 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="child" />
<propval name="ignore_error" type="astring" value="core,signal" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">RabbitMQ Server</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.91 2013/10/02 18:06:19 adam Exp $
# $NetBSD: Makefile,v 1.92 2014/03/11 14:34:39 jperkin Exp $
DISTNAME= rsync-3.1.0
CATEGORIES= net
@ -26,6 +26,7 @@ PKG_SYSCONFSUBDIR= rsync
RCD_SCRIPTS= rsyncd
RCD_SCRIPT_SRC.rsyncd= files/rsyncd.sh
SMF_NAME= rsyncd
SUBST_CLASSES+= paths
SUBST_MESSAGE.paths= Fixing hardcoded paths.

View file

@ -0,0 +1,29 @@
<?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>
<exec_method type="method" name="start" exec="@PREFIX@/bin/rsync --daemon --config %{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@/rsyncd.conf" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">rsyncd daemon</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,35 @@
<?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='0'>
<create_default_instance enabled='false' />
<single_instance />
<dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/service' />
</dependency>
<dependency name='name-services' grouping='require_all' restart_on='refresh' type='service'>
<service_fmri value='svc:/milestone/name-services' />
</dependency>
<method_context working_directory='@SPREAD_DIR@'>
<method_credential group='@SPREAD_USER@' user='@SPREAD_GROUP@' />
</method_context>
<exec_method name='start' type='method' exec='@PREFIX@/sbin/spread -c @PKG_SYSCONFDIR@/spread.conf' timeout_seconds='300' />
<exec_method name='stop' type='method' exec=':kill' timeout_seconds='60' />
<property_group name='startd' type='framework'>
<propval name='duration' type='astring' value='child' />
<propval name='ignore_error' type='astring' value='core,signal' />
</property_group>
<stability value='Stable' />
<template>
<common_name>
<loctext xml:lang='C'>Spread Daemon</loctext>
</common_name>
<documentation>
<manpage title='spread' section='1' manpath='@PREFIX@/@PKGMANDIR@' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.14 2014/01/16 09:51:54 adam Exp $
# $NetBSD: Makefile,v 1.15 2014/03/11 14:34:39 jperkin Exp $
DISTNAME= clamav-0.98.1
CATEGORIES= security
@ -40,9 +40,19 @@ CONFIGURE_ARGS+= --enable-readdir_r
BUILD_DEFS+= CLAMAV_USER CLAMAV_GROUP CLAMAV_DBDIR
FILES_SUBST+= CLAMAV_USER=${CLAMAV_USER}
FILES_SUBST+= CLAMAV_GROUP=${CLAMAV_GROUP}
FILES_SUBST+= CLAMAV_DBDIR=${CLAMAV_DBDIR}
MESSAGE_SUBST+= CLAMAV_USER=${CLAMAV_USER}
SUBST_CLASSES+= vars
SUBST_STAGE.vars= pre-configure
SUBST_FILES.vars= etc/clamd.conf
SUBST_VARS.vars= CLAMAV_DBDIR
RCD_SCRIPTS= clamd freshclamd
SMF_METHODS= ${RCD_SCRIPTS}
SMF_INSTANCES= ${SMF_METHODS}
PKG_GROUPS+= ${CLAMAV_GROUP}
PKG_USERS+= ${CLAMAV_USER}:${CLAMAV_GROUP}
@ -50,7 +60,6 @@ PKG_GROUPS_VARS+= CLAMAV_GROUP
PKG_USERS_VARS= CLAMAV_USER
EGDIR= ${PREFIX}/share/examples/clamav
FILES_SUBST+= CLAMAV_DBDIR=${CLAMAV_DBDIR}
OWN_DIRS_PERMS= ${CLAMAV_DBDIR} ${CLAMAV_USER} ${CLAMAV_GROUP} 0775
CONF_FILES= # empty

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.11 2014/01/16 09:51:54 adam Exp $
$NetBSD: distinfo,v 1.12 2014/03/11 14:34:39 jperkin Exp $
SHA1 (clamav-0.98.1.tar.gz) = 9f04c0e81463c36f7e58d18f16d1b88f3332dcb8
RMD160 (clamav-0.98.1.tar.gz) = 8899a07901493d5ea39c248417c2887d64101702
@ -9,4 +9,5 @@ SHA1 (patch-ab) = fea995ea944c2ae0f51a41e1a1076badf65c6c8b
SHA1 (patch-ad) = c862658ceba98ac415b0c193fc205c5862ac4970
SHA1 (patch-af) = d217633ed33c72b6d01a9aeef03f0f5dd33b4336
SHA1 (patch-ag) = cf4a0040a53c81402e8d15478407bc854af6fb30
SHA1 (patch-configure) = e5d27c543ca63baa0a11dd0066013bdb79178b13
SHA1 (patch-etc_clamd.conf.sample) = 69bed1c88cf60f699e64fd361091621728b9f9d1
SHA1 (patch-etc_freshclam.conf.sample) = 520ffbca5421ef2dc270e3c5a13cfb36a469e676

View file

@ -0,0 +1,30 @@
#!@SMF_METHOD_SHELL@
#
# $NetBSD: clamd.sh,v 1.1 2014/03/11 14:34:39 jperkin Exp $
#
# Init script for clamd(8)
#
. /lib/svc/share/smf_include.sh
PIDFILE="@CLAMAV_DBDIR@/clamd.pid"
case "$1" in
start)
@PREFIX@/sbin/clamd
;;
stop)
kill `@HEAD@ -1 ${PIDFILE}`
;;
refresh)
# Re-open any log files and reload the database
kill -HUP `@HEAD@ -1 ${PIDFILE}`
kill -USR2 `@HEAD@ -1 ${PIDFILE}`
;;
*)
echo "Usage: $0 {start|stop|refresh}" >&2
exit 1
;;
esac
exit $SMF_EXIT_OK

View file

@ -0,0 +1,28 @@
#!@SMF_METHOD_SHELL@
#
# $NetBSD: freshclamd.sh,v 1.1 2014/03/11 14:34:39 jperkin Exp $
#
# Init script for freshclam(1).
#
. /lib/svc/share/smf_include.sh
PIDFILE="@CLAMAV_DBDIR@/freshclamd.pid"
case "$1" in
start)
@PREFIX@/bin/freshclam -c 2 -d -p ${PIDFILE} -u @CLAMAV_USER@
;;
stop)
kill `@HEAD@ -1 ${PIDFILE}`
;;
refresh)
kill -HUP `@HEAD@ -1 ${PIDFILE}`
;;
*)
echo "Usage: $0 {start|stop|refresh}" >&2
exit 1
;;
esac
exit $SMF_EXIT_OK

View file

@ -0,0 +1,57 @@
<?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'>
<dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local'/>
</dependency>
<dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/service'/>
</dependency>
<dependency name='name-services' grouping='require_all' restart_on='refresh' type='service'>
<service_fmri value='svc:/milestone/name-services'/>
</dependency>
<dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/system-log'/>
</dependency>
<method_context working_directory='@CLAMAV_DBDIR@'>
<method_credential user='@CLAMAV_USER@' group='@CLAMAV_GROUP@'/>
</method_context>
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal'/>
</property_group>
<instance name='clamd' enabled='false'>
<dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/clamd.conf'/>
</dependency>
<exec_method name='start' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.clamd@ start' timeout_seconds='0'/>
<exec_method name='stop' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.clamd@ stop' timeout_seconds='0'/>
<exec_method name='refresh' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.clamd@ refresh' timeout_seconds='0'/>
<template>
<common_name>
<loctext xml:lang='C'>ClamAV anti-virus scanner daemon</loctext>
</common_name>
<documentation>
<manpage title='clamd' section='8' manpath='man'/>
</documentation>
</template>
</instance>
<instance name='freshclamd' enabled='false'>
<dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/freshclam.conf'/>
</dependency>
<exec_method name='start' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.freshclamd@ start' timeout_seconds='0'/>
<exec_method name='stop' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.freshclamd@ stop' timeout_seconds='0'/>
<exec_method name='refresh' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.freshclamd@ refresh' timeout_seconds='0'/>
<template>
<common_name>
<loctext xml:lang='C'>ClamAV anti-virus database update daemon</loctext>
</common_name>
<documentation>
<manpage title='freshclam' section='1' manpath='man'/>
</documentation>
</template>
</instance>
<stability value='Unstable'/>
</service>
</service_bundle>

View file

@ -0,0 +1,33 @@
$NetBSD: patch-etc_clamd.conf.sample,v 1.1 2014/03/11 14:34:40 jperkin Exp $
Make this useable out of the box.
--- etc/clamd.conf.sample.orig 2013-04-17 15:25:09.000000000 +0000
+++ etc/clamd.conf.sample
@@ -5,7 +5,7 @@
# Comment or remove the line below.
-Example
+#Example
# Uncomment this option to enable logging.
# LogFile must be writable for the user running daemon.
@@ -58,7 +58,7 @@ Example
# This option allows you to save a process identifier of the listening
# daemon (main thread).
# Default: disabled
-#PidFile /var/run/clamd.pid
+PidFile @CLAMAV_DBDIR@/clamd.pid
# Optional path to the global temporary directory.
# Default: system specific (usually /tmp or /var/tmp).
@@ -77,7 +77,7 @@ Example
# Path to a local socket file the daemon will listen on.
# Default: disabled (must be specified by a user)
-#LocalSocket /tmp/clamd.socket
+LocalSocket @CLAMAV_DBDIR@/clamd.sock
# Sets the group ownership on the unix socket.
# Default: disabled (the primary group of the user running clamd)

View file

@ -0,0 +1,15 @@
$NetBSD: patch-etc_freshclam.conf.sample,v 1.1 2014/03/11 14:34:40 jperkin Exp $
Make this useable out of the box.
--- etc/freshclam.conf.sample.orig 2013-04-17 15:25:09.000000000 +0000
+++ etc/freshclam.conf.sample
@@ -5,7 +5,7 @@
# Comment or remove the line below.
-Example
+#Example
# Path to the database directory.
# WARNING: It must match clamd.conf's directive!

View file

@ -0,0 +1,37 @@
<?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'>
<dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/service' />
</dependency>
<dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/system-log' />
</dependency>
<instance name='@SMF_INSTANCE@' enabled='false'>
<dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/authdaemonrc' />
</dependency>
<exec_method name='start' type='method' exec='@PREFIX@/sbin/authdaemond start' timeout_seconds='120' />
<exec_method name='stop' type='method' exec='@PREFIX@/sbin/authdaemond stop' timeout_seconds='60' />
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal' />
</property_group>
<property_group name='general' type='framework'>
<propval name='action_authorization' type='astring' value='solaris.smf.manage.courier-authlib' />
</property_group>
<template>
<common_name>
<loctext xml:lang='C'>authlib - Generic authentication API for Courier mail services</loctext>
</common_name>
<documentation>
<manpage title='authlib' section='3' manpath='@PREFIX@/@PKGMANDIR@' />
</documentation>
</template>
</instance>
<stability value='Evolving' />
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.215 2014/02/12 23:18:34 tron Exp $
# $NetBSD: Makefile,v 1.216 2014/03/11 14:34:40 jperkin Exp $
DISTNAME= openssh-6.4p1
PKGNAME= openssh-6.4.1
@ -161,6 +161,7 @@ CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f}
OWN_DIRS= ${OPENSSH_CHROOT}
RCD_SCRIPTS= sshd
RCD_SCRIPT_SRC.sshd= ${WRKDIR}/sshd.sh
SMF_METHODS= sshd
PLIST_SRC+= ${.CURDIR}/PLIST
FILES_SUBST+= SSH_PID_DIR=${SSH_PID_DIR:Q}

View file

@ -0,0 +1,47 @@
<?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='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local'/>
</dependency>
<dependency name='net-loopback' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/loopback'/>
</dependency>
<dependency name='net-physical' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/physical'/>
</dependency>
<dependency name='cryptosvc' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/cryptosvc'/>
</dependency>
<dependency name='utmp' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/utmp'/>
</dependency>
<dependency name='config_data' grouping='require_all' restart_on='restart' type='path'>
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/sshd_config'/>
</dependency>
<dependent name='openssh_multi-user-server' restart_on='none' grouping='optional_all'>
<service_fmri value='svc:/milestone/multi-user-server'/>
</dependent>
<exec_method name='start' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.sshd@ start' timeout_seconds='60'/>
<exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'/>
<exec_method name='refresh' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.sshd@ restart' timeout_seconds='60'/>
<property_group name='general' type='framework'>
<property name='action_authorization' type='astring'/>
</property_group>
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal'/>
</property_group>
<stability value='Unstable'/>
<template>
<common_name>
<loctext xml:lang='C'>OpenSSH server</loctext>
</common_name>
<documentation>
<manpage title='sshd' section='1M' manpath='@PREFIX@/@PKGMANDIR@'/>
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,68 @@
#!@SMF_METHOD_SHELL@
#
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)sshd 1.4 04/11/17 SMI"
SSHDIR=@PKG_SYSCONFDIR@
KEYGEN="@PREFIX@/bin/ssh-keygen -q"
PIDFILE=@VARBASE@/run/sshd.pid
# Checks to see if RSA, and DSA host keys are available
# if any of these keys are not present, the respective keys are created.
create_key()
{
keypath=$1
keytype=$2
if [ ! -f $keypath ]; then
grep "^HostKey $keypath" $SSHDIR/sshd_config > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo Creating new $keytype public/private host key pair
$KEYGEN -f $keypath -t $keytype -N ''
return $?
fi
fi
return 0
}
# This script is being used for two purposes: as part of an SMF
# start/stop/refresh method, and as a sysidconfig(1M)/sys-unconfig(1M)
# application.
#
# Both, the SMF methods and sysidconfig/sys-unconfig use different
# arguments..
case $1 in
# sysidconfig/sys-unconfig arguments (-c and -u)
'-c')
create_key $SSHDIR/ssh_host_rsa_key rsa
create_key $SSHDIR/ssh_host_dsa_key dsa
;;
'-u')
# sys-unconfig(1M) knows how to remove ssh host keys, so there's
# nothing to do here.
:
;;
# SMF arguments (start and restart [really "refresh"])
'start')
@PREFIX@/sbin/sshd
;;
'restart')
if [ -f "$PIDFILE" ]; then
/usr/bin/kill -HUP `/usr/bin/cat $PIDFILE`
fi
;;
*)
echo "Usage: $0 { start | restart }"
exit 1
;;
esac
exit $?

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.11 2014/02/04 15:38:16 pettai Exp $
# $NetBSD: Makefile,v 1.12 2014/03/11 14:34:40 jperkin Exp $
VER= 2.6
DISTNAME= DenyHosts-${VER}
@ -32,6 +32,7 @@ PYTHON_SELF_CONFLICT= yes
PYTHON_VERSIONS_INCOMPATIBLE= 33
RCD_SCRIPTS+= denyhosts
SMF_NAME= denyhost
post-configure:
${RM} ${WRKDIR}/${DISTNAME}/scripts/*.orig

View file

@ -0,0 +1,31 @@
<?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='0'>
<create_default_instance enabled='true' />
<single_instance />
<dependency name='network' grouping='require_all' restart_on='error' type='service'>
<service_fmri value='svc:/milestone/network:default' />
</dependency>
<dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/denyhosts.conf' />
</dependency>
<exec_method name='start' type='method' exec='@PREFIX@/bin/denyhosts.py --config=%{config_file} --daemon' timeout_seconds='60' />
<exec_method name='stop' type='method' exec=':kill' timeout_seconds='60' />
<property_group name='startd' type='framework'>
<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@/denyhosts.conf" />
</property_group>
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>DenyHosts Daemon</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.31 2013/07/25 11:41:25 he Exp $
# $NetBSD: Makefile,v 1.32 2014/03/11 14:34:40 jperkin Exp $
#
DISTNAME= munin_${VER}
@ -99,6 +99,7 @@ MESSAGE_SUBST+= VARBASE=${VARBASE:Q}
BUILD_DEFS+= VARBASE
RCD_SCRIPTS+= munin-node
SMF_NAME= munin
EGDIR= ${PREFIX}/share/examples/munin

View file

@ -0,0 +1,37 @@
<?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>
<dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
<service_fmri value='file://@PKG_SYSCONFDIR@/munin-node.conf'/>
</dependency>
<method_context>
<method_environment>
<envvar name="PATH" value="@PREFIX@/bin:@PREFIX@/sbin:/usr/xpg4/bin:/usr/bin:/usr/sbin:/usr/sfw/bin:/usr/ccs/bin" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/munin-node" 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@/munin-node.conf" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Munin node</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.14 2014/02/06 12:01:43 spz Exp $
# $NetBSD: Makefile,v 1.15 2014/03/11 14:34:40 jperkin Exp $
#
DISTNAME= apache-tomcat-${TOMCAT_VER}
@ -28,6 +28,7 @@ TOMCAT_HOME= ${PREFIX}/share/tomcat
EGDIR= ${PREFIX}/share/examples/tomcat
DOCDIR= ${PREFIX}/share/doc/tomcat
RCD_SCRIPTS= tomcat
SMF_NAME= tomcat
TOMCAT_USER?= tomcat
TOMCAT_GROUP?= tomcat
USERGROUP_PHASE= pre-install

View file

@ -0,0 +1,35 @@
<?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="@TOMCAT_HOME@/logs">
<method_credential user="@TOMCAT_USER@" group="@TOMCAT_GROUP@" privileges="basic,net_privaddr" />
<method_environment>
<envvar name="JAVA_HOME" value="@JAVA_HOME@" />
<envvar name="CATALINA_HOME" value="@TOMCAT_HOME@" />
<envvar name="CATALINA_PID" value="@TOMCAT_HOME@/logs/catalina.pid" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@TOMCAT_HOME@/bin/catalina.sh start" timeout_seconds="600" />
<exec_method type="method" name="stop" exec="@TOMCAT_HOME@/bin/catalina.sh stop" 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"></property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Tomcat</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.16 2013/11/24 04:44:51 ryoon Exp $
# $NetBSD: Makefile,v 1.17 2014/03/11 14:34:40 jperkin Exp $
#
DISTNAME= apache-tomcat-${TOMCAT_VER}
@ -28,6 +28,7 @@ TOMCAT_HOME= ${PREFIX}/share/tomcat
EGDIR= ${PREFIX}/share/examples/tomcat
DOCDIR= ${PREFIX}/share/doc/tomcat
RCD_SCRIPTS= tomcat
SMF_NAME= tomcat
TOMCAT_USER?= tomcat
TOMCAT_GROUP?= tomcat
PKG_GROUPS= ${TOMCAT_GROUP}

View file

@ -0,0 +1,35 @@
<?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="@TOMCAT_HOME@/logs">
<method_credential user="@TOMCAT_USER@" group="@TOMCAT_GROUP@" privileges="basic,net_privaddr" />
<method_environment>
<envvar name="JAVA_HOME" value="@JAVA_HOME@" />
<envvar name="CATALINA_HOME" value="@TOMCAT_HOME@" />
<envvar name="CATALINA_PID" value="@TOMCAT_HOME@/logs/catalina.pid" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@TOMCAT_HOME@/bin/catalina.sh start" timeout_seconds="600" />
<exec_method type="method" name="stop" exec="@TOMCAT_HOME@/bin/catalina.sh stop" 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"></property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Tomcat</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,38 @@
<?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='0'>
<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-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/httpd.conf'/>
</dependency>
<method_context>
<method_environment>
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
</method_environment>
</method_context>
<exec_method name='start' type='method' exec='@PREFIX@/sbin/httpd -k start' timeout_seconds='300' />
<exec_method name='stop' type='method' exec='@PREFIX@/sbin/httpd -k stop' timeout_seconds='300' />
<exec_method name='refresh' type='method' exec='@PREFIX@/sbin/httpd -k graceful' timeout_seconds='300' />
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal' />
</property_group>
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>Apache 2 HTTP server</loctext>
</common_name>
<documentation>
<manpage title='httpd' section='8' manpath='@PREFIX@/apache2/man' />
<doc_link name='apache.org' uri='http://httpd.apache.org' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,38 @@
<?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='0'>
<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-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/httpd.conf'/>
</dependency>
<method_context>
<method_environment>
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
</method_environment>
</method_context>
<exec_method name='start' type='method' exec='@PREFIX@/sbin/httpd -k start' timeout_seconds='300' />
<exec_method name='stop' type='method' exec='@PREFIX@/sbin/httpd -k stop' timeout_seconds='300' />
<exec_method name='refresh' type='method' exec='@PREFIX@/sbin/httpd -k graceful' timeout_seconds='300' />
<property_group name='startd' type='framework'>
<propval name='ignore_error' type='astring' value='core,signal' />
</property_group>
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>Apache 2 HTTP server</loctext>
</common_name>
<documentation>
<manpage title='httpd' section='8' manpath='@PREFIX@/apache2/man' />
<doc_link name='apache.org' uri='http://httpd.apache.org' />
</documentation>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,34 @@
<?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-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<method_context>
<method_environment>
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/lighttpd -f %{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@/lighttpd.conf" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Lighttpd HTTP daemon</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,35 @@
<?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-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<method_context>
<method_environment>
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/nginx -c %{config_file}" timeout_seconds="60" />
<exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
<exec_method type="method" name="refresh" exec=":kill -HUP" 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@/nginx.conf" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Nginx HTTP daemon</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -0,0 +1,35 @@
<?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-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local:default' />
</dependency>
<method_context>
<method_environment>
<envvar name="LD_PRELOAD_32" value="/usr/lib/extendedFILE.so.1" />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/nginx -c %{config_file}" timeout_seconds="60" />
<exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
<exec_method type="method" name="refresh" exec=":kill -HUP" 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@/nginx.conf" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Nginx HTTP daemon</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.9 2013/09/13 09:24:19 fhajny Exp $
# $NetBSD: Makefile,v 1.10 2014/03/11 14:34:41 jperkin Exp $
PKGNAME= ${PHP_PKG_PREFIX}-fpm-${PHP_BASE_VERS}
CATEGORIES= www
@ -34,6 +34,7 @@ CONFIGURE_ARGS+= --enable-fpm
CONFIGURE_ARGS+= --with-fpm-user=${FPM_USER}
CONFIGURE_ARGS+= --with-fpm-group=${FPM_GROUP}
SMF_NAME= php-fpm
RCD_SCRIPTS= php_fpm
MESSAGE_SUBST+= CGIDIR=${CGIDIR:Q}
MESSAGE_SUBST+= VARBASE=${VARBASE:Q}

View file

@ -0,0 +1,30 @@
<?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 project="php"></method_context>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/php-fpm -y %{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@/php-fpm.conf" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">PHP FPM Service</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.19 2013/12/11 16:13:22 fhajny Exp $
# $NetBSD: Makefile,v 1.20 2014/03/11 14:34:41 jperkin Exp $
#
DISTNAME= varnish-3.0.5
@ -34,6 +34,9 @@ PKG_HOME.${VRNUSER}= ${VRNDIR}
PKG_SHELL.${VRNUSER}= ${SH}
PKG_GECOS.${VRNUSER}= Varnish daemon user
FILES_SUBST+= VRNUSER=${VRNUSER}
FILES_SUBST+= VRNGROUP=${VRNGROUP}
RCD_SCRIPTS= varnishd varnishlog varnishncsa
PYTHON_FOR_BUILD_ONLY= yes

View file

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="varnish">
<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>
<method_environment>
<envvar name='PATH' value='@PREFIX@/sbin:@PREFIX@/bin:/sbin:/usr/sbin:/usr/bin' />
</method_environment>
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/sbin/varnishd -a %{listen} -l %{size} -f %{config_file} -u @VRNUSER@ -g @VRNGROUP@" 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@/default.vcl" />
<propval name="listen" type="astring" value="0.0.0.0:8080" />
<propval name="size" type="astring" value="64M" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">Varnish daemon</loctext>
</common_name>
</template>
</service>
</service_bundle>