Package nut: Скрипты

Post install

/usr/sbin/post_service upsmon
Pre install

if [ $1 -gt 1 -a -x /sbin/upsmon -a ! -d /etc/nut/certs ]; then
	echo "Upgrading from incompatible nut < 1.4.1-alt2" >&2
	[ -x /etc/rc.d/init.d/upsmon ] && service upsmon condstop ||:
	[ -x /etc/rc.d/init.d/upsd ] && service upsd condstop ||:
	if [ ! -d "/etc/nut" -o -e "/etc/nut".bak ] ||
	   ! mv -v "/etc/nut" "/etc/nut".bak; then
		echo "Automatic upgrade failed." >&2
		exit 1
	fi
	echo "Please update config files manually." >&2
fi
/usr/sbin/groupadd -r -f upsmon
/usr/sbin/useradd -r -g upsmon -d / -s /dev/null \
	-c "NUT monitoring daemon" -n upsmon >/dev/null 2>&1 ||:
Pre uninstall

/usr/sbin/preun_service upsmon