#!/bin/sh # postinst script for wowpreklad set -e apache_install() { mkdir -p /etc/apache2/conf-available ln -sf ../../wowpreklad/apache.conf /etc/apache2/conf-available/wowpreklad.conf COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then . /usr/share/apache2/apache2-maintscript-helper apache2_invoke enconf wowpreklad elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then [ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/wowpreklad.conf ] && ln -s ../conf-available/wowpreklad.conf /etc/apache2/conf.d/wowpreklad.conf fi } service_install() { mkdir -p /etc/systemd/system ln -sf ../../wowpreklad/wowpreklad.service /etc/systemd/system/wowpreklad.service } if [ "$1" = "configure" ]; then apache_install $@ service_install $@ fi exit 0