#!/bin/sh set -e # mlohn postinst # check MariaDB or MySQL maria=$(mysql -V |grep MariaDB) || true # check, whether mlohn user exists if ! mysql -umlohn -pmlohn mlohn -e";" >/dev/null 2>&1 then echo "Installation of mlohn user ..." # unix_socket authentification for MariaDB 10 if [ -n "$maria" ] then mysql </dev/null then # .conf necessary for Debian 7 a2ensite mlohn.conf fi # activate rewrite engine if ! test -e /etc/apache2/mods-enabled/rewrite.load then ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled echo "rewrite engine enabled" fi # activate https a2enmod ssl # restart apache /etc/init.d/apache2 restart # create directory for Lohnabrechnungen / Socket mkdir -p /var/mlohn/print chown www-data /var/mlohn/print chgrp www-data /var/mlohn/print chown www-data /var/mlohn chgrp www-data /var/mlohn # pdftkd installieren #systemctl enable pdftkd #systemctl restart pdftkd # suppress debug logging in syslog sed -i "s/^\*\.\*/*.info/" /etc/rsyslog.conf systemctl restart rsyslog