#!/bin/sh MIRROR_DIR="/net/mirror" HTTP_DIR="/var/www/mirror" case $1 in configure) rm -f $HTTP_DIR ln -s "$MIRROR_DIR" "$HTTP_DIR" if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then . /usr/share/apache2/apache2-maintscript-helper apache2_invoke ensite mirror apache2_invoke ensite lliurex-mirror fi invoke-rc.d apache2 reload || true n4d-modules enable-plugin /etc/n4d/conf.d/MirrorManager.json || true # for configurationfile in $(ls /usr/share/lliurex-mirror/conf); do # if [ ! -e "/etc/lliurex-mirror/conf/${configurationfile}" ];then # cp /usr/share/lliurex-mirror/conf/${configurationfile} /etc/lliurex-mirror/conf # fi # done if [ ! -e "/etc/lliurex-mirror/conf/llx21.json" ]; then cp /usr/share/lliurex-mirror/conf/llx21.json /etc/lliurex-mirror/conf fi # Fix, enable plugin doesn't execute new startup when update, ensure full restart systemctl restart n4d || true ;; *) echo "Nothing to do" ;; esac #DEBHELPER#