if [ "$server" != "$ocsserver" ]; then
db_set ocsinventory-agent/server "$ocsserver"
+ set_ocsserver="yes"
fi
cp_check_and_sed "^server" \
"s#^server.*#server=$ocsserver#g" \
- /etc/ocsinventory/ocsinventory-agent.cfg || true
+ /etc/ocsinventory/ocsinventory-agent.cfg \
+ && set_ocsserver="yes" || true
+
+if [ "$set_ocsserver" = "yes" ]; then
+ echo "CN: OCS Inventory server: $ocsserver"
+fi
if ! grep -q ^server= /etc/ocsinventory/ocsinventory-agent.cfg; then
echo "server=$ocsserver" >> /etc/ocsinventory/ocsinventory-agent.cfg
set -e
if [ "$1" = remove ]; then
- rm -f /etc/init.d/amavis
dpkg-divert --quiet --package ocsinventory-agent-cn --remove --rename \
- --divert /usr/share/perl5/Ocsinventory/Agent/Backend/OS/Generic/Hostname.pm.divert
/usr/share/perl5/Ocsinventory/Agent/Backend/OS/Generic/Hostname.pm || true
fi