#!/bin/sh #---------------------------------------------------------------------------- # /var/install/deinstall/eisfax - deinstall script # # Creation: 2005-04-14 jv # Last Update: $Id$ # # Copyright (c) 2005-@@YEAR@@ Holger Bruenjes, holgerbruenjes(at)gmx(dot)net # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- . /var/lib/eisfax/eisfax.info # set package-name package_name=eisfax # check for update is given case "${1}" in --update|update) update=true ;; esac # --------------------------------------------------------------------------- # stop deamon # --------------------------------------------------------------------------- if ! /usr/sbin/service is-enabled eisfax-hfaxd.service then quiet='--quiet' fi # stop eisfax-devices systemd unit files /var/install/config.d/${package_name}.sh --quiet devices_stop /usr/sbin/service ${quiet} stop eisfax-hfaxd.service \ eisfax-faxq.service /usr/sbin/service disable eisfax-hfaxd.service \ eisfax-faxq.service # --------------------------------------------------------------------------- # remove config and check file # --------------------------------------------------------------------------- rm -f /etc/default.d/${package_name} rm -f /etc/check.d/${package_name} rm -f /etc/check.d/${package_name}.* # --------------------------------------------------------------------------- # remove program files # --------------------------------------------------------------------------- if [ -f /usr/bin/${PRINTFAX_DEL_FILE} ] then while read line do rm -f /usr/bin/$line done /dev/null rmdir --ignore-fail-on-non-empty ${FAXCRON_TIMER_DIR} 2>/dev/null /usr/bin/systemctl --no-reload disable --now eisfax-faxq.service \ eisfax-hfaxd.service \ eisfax.target \ eisfax-faxcron.timer \ eisfax-faxqclean.timer /usr/bin/systemctl clean --what=state eisfax-faxcron.timer \ eisfax-faxqclean.timer exit 0 # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------