source: trunk/Install/deb/debian/postinst

Last change on this file was 875, checked in by chronos, 7 years ago
  • Added: Systemd service file.
  • Property svn:executable set to *
File size: 912 bytes
Line 
1#!/bin/sh
2# postinst script for wowpreklad
3
4set -e
5
6apache_install() {
7 mkdir -p /etc/apache2/conf-available
8 ln -sf ../../wowpreklad/apache.conf /etc/apache2/conf-available/wowpreklad.conf
9
10 COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
11
12 if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
13 . /usr/share/apache2/apache2-maintscript-helper
14 apache2_invoke enconf wowpreklad
15 elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
16 [ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/wowpreklad.conf ] && ln -s ../conf-available/wowpreklad.conf /etc/apache2/conf.d/wowpreklad.conf
17 fi
18}
19
20service_install() {
21 mkdir -p /etc/systemd/system
22 ln -sf ../../wowpreklad/wowpreklad.service /etc/systemd/system/wowpreklad.service
23}
24
25if [ "$1" = "configure" ]; then
26 apache_install $@
27 service_install $@
28fi
29
30exit 0
Note: See TracBrowser for help on using the repository browser.