pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/netatalk3/files new startup scripts



details:   https://anonhg.NetBSD.org/pkgsrc/rev/511ee0201ac6
branches:  trunk
changeset: 354687:511ee0201ac6
user:      christos <christos%pkgsrc.org@localhost>
date:      Mon Nov 07 00:42:32 2016 +0000

description:
new startup scripts

diffstat:

 net/netatalk3/files/netatalk        |  18 ++++++++++++++++++
 net/netatalk3/files/netatalk_smf.sh |  32 ++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+), 0 deletions(-)

diffs (58 lines):

diff -r bb37015440ab -r 511ee0201ac6 net/netatalk3/files/netatalk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk3/files/netatalk      Mon Nov 07 00:42:32 2016 +0000
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# $NetBSD: netatalk,v 1.1 2016/11/07 00:42:32 christos Exp $
+#
+
+# PROVIDE: netatalk
+# REQUIRE: NETWORKING mountcritremote syslogd
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="netatalk"
+rcvar=$name
+command="/usr/pkg/libexec/netatalk/${name}"
+pidfile="/var/run/${name}.pid"
+required_files="/etc/${name}/afp.conf /etc/${name}/extmap.conf"
+
+load_rc_config $name
+run_rc_command "$1"
diff -r bb37015440ab -r 511ee0201ac6 net/netatalk3/files/netatalk_smf.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk3/files/netatalk_smf.sh       Mon Nov 07 00:42:32 2016 +0000
@@ -0,0 +1,32 @@
+#!@SMF_METHOD_SHELL@
+#
+# SunOS SMF start/stop/refresh "methods" script for Netatalk 3
+
+# $NetBSD: netatalk_smf.sh,v 1.1 2016/11/07 00:42:32 christos Exp $
+
+PIDFILE=@VARBASE@/run/netatalk.pid
+
+case $1 in
+'start')
+       @PREFIX@/libexec/netatalk/netatalk
+       ;;
+
+'stop')
+       if [ -f "$PIDFILE" ]; then
+               /usr/bin/kill `/usr/bin/head -1 $PIDFILE`
+       fi
+       ;;
+
+'refresh')
+       if [ -f "$PIDFILE" ]; then
+               /usr/bin/kill -HUP `/usr/bin/head -1 $PIDFILE`
+       fi
+       ;;
+
+*)
+       echo "Usage: $0 { start | stop | refresh }"
+       exit 1
+       ;;
+esac
+
+exit $?



Home | Main Index | Thread Index | Old Index