projects
/
clamav-cn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
izmjene u postinstu
[clamav-cn.git]
/
debian
/
postinst
diff --git
a/debian/postinst
b/debian/postinst
index
bff2dbb
..
414f933
100755
(executable)
--- a/
debian/postinst
+++ b/
debian/postinst
@@
-5,7
+5,7
@@
set -e
[ "$1" = "configure" ] || exit 0
[ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx
[ "$1" = "configure" ] || exit 0
[ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx
-# Load CARNet functions
+# Load CARNet Tools
. /usr/share/carnet-tools/functions.sh
# obsolete option
. /usr/share/carnet-tools/functions.sh
# obsolete option
@@
-13,7
+13,17
@@
cp_check_and_sed "^AllowSupplementaryGroups" \
"s/^AllowSupplementaryGroups/#AllowSupplementaryGroups/g" \
/etc/clamav/clamd.conf && restart="yes" || true
"s/^AllowSupplementaryGroups/#AllowSupplementaryGroups/g" \
/etc/clamav/clamd.conf && restart="yes" || true
-chown -R clamav:clamav /var/run/clamav /var/lib/clamav /var/log/clamav
+if [ -d /run/clamav ]; then
+ chown -R clamav:clamav /run/clamav
+fi
+
+if [ -d /var/lib/clamav ]; then
+ chown -R clamav:clamav /var/lib/clamav
+fi
+
+if [ -d /var/log/clamav ]; then
+ chown -R clamav:clamav /var/log/clamav
+fi
# dodaj korisnika clamav u grupu amavis (ako postoji...)
getent group amavis > /dev/null && usermod -G amavis clamav && restart="yes"
# dodaj korisnika clamav u grupu amavis (ako postoji...)
getent group amavis > /dev/null && usermod -G amavis clamav && restart="yes"