aboutsummaryrefslogtreecommitdiff
path: root/french/plgrenouille/pkg-install
diff options
context:
space:
mode:
Diffstat (limited to 'french/plgrenouille/pkg-install')
-rw-r--r--french/plgrenouille/pkg-install37
1 files changed, 37 insertions, 0 deletions
diff --git a/french/plgrenouille/pkg-install b/french/plgrenouille/pkg-install
new file mode 100644
index 000000000000..581cd95f370e
--- /dev/null
+++ b/french/plgrenouille/pkg-install
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# Configure plgrenouille.
+#
+
+[ $# != 2 ] && exit 1
+[ -z "${PKG_PREFIX}" ] && exit 1
+
+PORTNAME=plgrenouille
+SPOOL_DIR=/var/spool/${PORTNAME}
+SPOOL_MODES=u+rw,go-rw
+SPOOL_USER=daemon
+
+case "$2" in
+POST-INSTALL)
+ if [ ! -d ${SPOOL_DIR} ]; then
+ mkdir -p ${SPOOL_DIR} &&
+ chmod ${SPOOL_MODES} ${SPOOL_DIR} &&
+ chown ${SPOOL_USER} ${SPOOL_DIR}
+ fi
+ [ -n "${BATCH}" ] && exit 0
+ [ -f ${PKG_PREFIX}/etc/rc.d/plgrenouille.sh ] &&
+ sh ${PKG_PREFIX}/etc/rc.d/plgrenouille.sh configure
+ ;;
+DEINSTALL)
+ if [ -f ${PKG_PREFIX}/etc/rc.d/plgrenouille.sh ]; then
+ sh ${PKG_PREFIX}/etc/rc.d/plgrenouille.sh stop
+ fi
+ ;;
+POST-DEINSTALL)
+ if [ -d ${SPOOL_DIR} ]; then
+ rm -rf ${SPOOL_DIR}
+ fi
+ ;;
+esac