%PDF- %PDF-
| Direktori : /var/lib/dpkg/info/ |
| Current File : //var/lib/dpkg/info/veeam.postinst |
#!/bin/sh
set -e
PATH=$PATH:/usr/sbin
GROUP="veeam"
case "$1" in
configure)
if ! getent group $GROUP >/dev/null; then
groupadd --system $GROUP
fi
mkdir -p /var/log/veeam/
mkdir -p -m 2775 /var/log/veeam/config
chgrp $GROUP /var/log/veeam/config
if [ -d /run/systemd/system ]
then # for systemd
echo "Enable veeamservice"
systemctl enable veeamservice
echo "Try to stop veeamservice"
systemctl stop veeamservice 2>&1 || true
echo "Start veeamservice"
systemctl start veeamservice
else
if [ which update-rc.d >/dev/null 2>&1 ]
then
update-rc.d veeamservice defaults
fi
if [ $# -eq 2 ] #only install
then
if [ which invoke-rc.d >/dev/null 2>&1 ]
then
invoke-rc.d veeamservice start
else
/etc/init.d/veeamservice start
fi
fi
fi
;;
esac