diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2001-10-06 04:10:21 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2001-10-06 04:10:21 +0000 |
commit | 80768d913957f3c77ce9d7210e78baf196d3a44a (patch) | |
tree | b73b5f1e75430bb962531bea9df709bdb4dd82a1 /security/drweb/scripts/post-install | |
parent | (1) Drop maintainership. (diff) |
Run as drweb user, not as root
Notes
Notes:
svn path=/head/; revision=48488
Diffstat (limited to 'security/drweb/scripts/post-install')
-rw-r--r-- | security/drweb/scripts/post-install | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/security/drweb/scripts/post-install b/security/drweb/scripts/post-install new file mode 100644 index 000000000000..d34cf735c326 --- /dev/null +++ b/security/drweb/scripts/post-install @@ -0,0 +1,35 @@ +#!/bin/sh +ex=0 +if ! id -u drweb > /dev/null 2>&1; then + echo "You need an account \"drweb\" to install this package." + echo "Please add it by hand (try \"man vipw\") and try again." + echo "" + echo "An example /etc/master.passwd entry is:" + echo "drweb:*:426:426::0:0:Dr.Web Scanner:/nonexistent:/sbin/nologin" + echo "" + ex=1 +fi +if ! grep -q "^drweb:" /etc/group; then + echo "You need a group \"drweb\" to install this package." + echo "" + echo "An example /etc/group entry is:" + echo "drweb:*:426:" + echo "" + ex=1 +fi +if ! grep -q "^!drweb" /etc/syslog.conf; then + echo "You may also add this lines to your /etc/syslog.conf:" + echo "*.* /var/log/drwebd.log" + echo "" +fi +if crontab -u drweb -l 2>&1 | grep -q "no crontab"; then + echo "You may also use this crontab entry for \"drweb\" user:" + echo "SHELL=/bin/sh" + echo "MAILTO=root" + echo "0 12 * * * ${PREFIX}/drweb/update/update.pl ${PREFIX}/drweb" + echo "" +fi +[ "$ex" = "1" ] && exit 1 +usrdir=${PREFIX}/drweb +chown -R drweb:drweb $usrdir +exit 0 |