salt/pkg/debian/salt-api.postinst

15 lines
363 B
Text

. /usr/share/debconf/confmodule
case "$1" in
configure)
db_get salt-master/user
if [ "$RET" != "root" ]; then
if [ ! -e "/var/log/salt/api" ]; then
touch /var/log/salt/api
chmod 640 /var/log/salt/api
fi
chown $RET:$RET /var/log/salt/api
fi
if command -v systemctl; then systemctl enable salt-api; fi
;;
esac