Files
server/var/lib/dpkg/info/drweb-daemon.postinst
2026-01-07 20:52:11 +01:00

38 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
# ESP Package Manager v6.0.2 Dr.Web Edition
if ! [ -f /etc/drweb/monitor/daemon.mmc ]; then
cp /opt/drweb/doc/daemon/daemon.mmc /etc/drweb/monitor/
fi
if ! [ -f /etc/drweb/templates/drwebd/msg.tmpl ]; then
cp /opt/drweb/doc/daemon/msg.tmpl /etc/drweb/templates/drwebd/msg.tmpl
fi
make_symlink() {
if test -e "$1" -a ! -e "$2" ; then
ln -s "$1" "$2"
fi
}
create_man_symlinks() {
prefix=$1
mans=$2
for mandir in $prefix/man/man* ; do
#get result man prefix
for dir in /usr/local/share/man /usr/share/man ; do
if [ -d "$dir/`basename $mandir`" ] ; then
man_dst="$dir/`basename $mandir`"
break
fi
done
for man in $mans ; do
make_symlink "$mandir/$man" "$man_dst/$man"
done
done
}
create_man_symlinks /opt/drweb "drwebd.1 drwebdc.1" "$MANS"
update-rc.d drwebd defaults
if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d drwebd start || true
else
/etc/init.d/drwebd start || true
fi