diff options
author | crees <crees@FreeBSD.org> | 2011-06-14 03:22:25 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2011-06-14 03:22:25 +0800 |
commit | f1b4802f507dd01c21197418040ffe85c2cd2b65 (patch) | |
tree | 1aba04a864870be09e1190492d1fe12fceab37b1 /mail/mailman/pkg-install | |
parent | c8f6aa91e53e4b6ed60a127db78786505073f400 (diff) | |
download | freebsd-ports-graphics-f1b4802f507dd01c21197418040ffe85c2cd2b65.tar.gz freebsd-ports-graphics-f1b4802f507dd01c21197418040ffe85c2cd2b65.tar.zst freebsd-ports-graphics-f1b4802f507dd01c21197418040ffe85c2cd2b65.zip |
- Correct GROUP when postfix OPTION is selected [1]
- Add nobody user and group to UIDs/GIDs for mail/mailman [2]
- Stop touching files outside WRKDIR before install [2]
- Use USERS and GROUPS [2]
- Change BROKEN to IGNORE for incorrect OPTIONS choices [2]
- Use @stopdaemon [2]
- Correct rc script to check for pidfile before attempting kill [2]
PR: ports/142000
Submitted by: Adriaan <ratten.adriaan@gmail.com> [1], crees [2]
Approved by: rene (mentor), wxs (maintainer)
Diffstat (limited to 'mail/mailman/pkg-install')
-rw-r--r-- | mail/mailman/pkg-install | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/mail/mailman/pkg-install b/mail/mailman/pkg-install index 2441fa53211..11add7d3e51 100644 --- a/mail/mailman/pkg-install +++ b/mail/mailman/pkg-install @@ -6,49 +6,11 @@ PATH=/bin:/usr/bin:/usr/sbin case $2 in -PRE-INSTALL) - echo "---> Starting install script:" - - if [ -z "%%MAILMANDIR%%" -o \ - -z "%%USER%%" -o -z "%%GROUP%%" -o \ - -z "%%UID%%" -o -z "%%GID%%" ]; then - echo "ERROR: A required pragma was empty" - exit 1 - fi - - # Create group if required - if pw group show "%%GROUP%%" >/dev/null 2>&1; then - echo "---> Using existing group \"%%GROUP%%\"" - else - echo "---> Adding group \"%%GROUP%%\" (%%GID%%)" - /usr/sbin/pw groupadd %%GROUP%% -g %%GID%% || exit 1 - fi - - # Create user if required - if pw user show "%%USER%%" >/dev/null 2>&1; then - echo "---> Using existing user \"%%USER%%\"" - else - echo "---> Adding user \"%%USER%%\" (%%UID%%)" - pw useradd "%%USER%%" -u "%%UID%%" -g "%%GROUP%%" -h - \ - -d "%%MAILMANDIR%%" -s "/sbin/nologin" -c "Mailman Owner" || exit 1 - fi - - # Create home directory if required - if [ -d "%%MAILMANDIR%%" ]; then - echo "---> Using existing Mailman directory (%%MAILMANDIR%%)" - echo " (There may be existing active mailing lists - this installation will" - echo " attempt to preserve them.)" - else - echo "---> Creating Mailman directory (%%MAILMANDIR%%)" - (umask 002 && /bin/mkdir -p "%%MAILMANDIR%%") || exit 1 - /usr/sbin/chown -R "%%USER%%:%%GROUP%%" "%%MAILMANDIR%%" || exit 1 - /bin/chmod g+s "%%MAILMANDIR%%" || exit 1 - fi - ;; - POST-INSTALL) echo "---> Starting post-install script:" + /bin/chmod g+s "%%MAILMANDIR%%" || exit 1 + echo "---> Checking crontab(5) file for user \"%%USER%%\"" if [ -e /var/cron/allow ]; then |