summaryrefslogtreecommitdiffstats
path: root/sysutils/fcron/pkg-install
diff options
context:
space:
mode:
authorjylefort <jylefort@FreeBSD.org>2005-10-04 17:54:23 +0000
committerjylefort <jylefort@FreeBSD.org>2005-10-04 17:54:23 +0000
commit69d0e9b08d618a9b5d3dce56fadf80b194f8c092 (patch)
treef43e077d51350258238416a90610df20597f2176 /sysutils/fcron/pkg-install
parentdd8f573b690e5fd995ed3cbde14a725107b9caed (diff)
downloadFreeBSD-ports-69d0e9b08d618a9b5d3dce56fadf80b194f8c092.zip
FreeBSD-ports-69d0e9b08d618a9b5d3dce56fadf80b194f8c092.tar.gz
- Update to 3.0.0
- Pass maintainership to submitter PR: ports/85817 Submitted by: Brad Huntting <huntting@hunkular.glarp.com> (new maintainer)
Diffstat (limited to 'sysutils/fcron/pkg-install')
-rw-r--r--sysutils/fcron/pkg-install37
1 files changed, 37 insertions, 0 deletions
diff --git a/sysutils/fcron/pkg-install b/sysutils/fcron/pkg-install
new file mode 100644
index 0000000..3a6569b
--- /dev/null
+++ b/sysutils/fcron/pkg-install
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+if [ "$2" = PRE-INSTALL ]; then
+ user=fcron
+ group=fcron
+
+ if /usr/sbin/pw groupshow $group 2>/dev/null; then
+ echo "Using already existing group \"$group\"."
+ else
+ if /usr/sbin/pw groupadd $group; then
+ echo "Added group \"$group\"."
+ else
+ echo "Unable to add group \"$group\"."
+ echo "Please create it manually and try again."
+ exit 1
+ fi
+ fi
+
+ if /usr/sbin/pw usershow $user 2>/dev/null; then
+ echo "Using already existing user \"$user\"."
+ else
+ if /usr/sbin/pw useradd $user -g $group -c "fcron pseudo-user"; then
+ echo "Added user \"$user\"."
+ else
+ echo "Unable to add user \"$user\"."
+ echo "Please create it manually and try again."
+ exit 1
+ fi
+ fi
+elif [ "$2" = POST-INSTALL ]; then
+ /usr/bin/install -o fcron -g fcron -m 770 -d /var/spool/fcron
+
+ for f in fcron.allow fcron.conf fcron.deny; do
+ /usr/bin/install -o root -g fcron -m 640 \
+ $PKG_PREFIX/etc/$f.dist $PKG_PREFIX/etc/$f
+ done
+fi
OpenPOWER on IntegriCloud