#!/bin/sh #---------------------------------------------------------------------------- # /var/install/deinstall/tftpd - deinstall script # # Creation : 2012-08-25 holbru # Last update: $Id$ # # Copyright (c) 2012-@@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. #---------------------------------------------------------------------------- # set package name package_name=tftpd # check for update is given if [ "${1}" = "--update" ] then update=true __quiet='--quiet' fi # --------------------------------------------------------------------------- # stop deamon # --------------------------------------------------------------------------- if [ "$(/usr/bin/systemctl is-enabled tftp.socket)" = "enabled" ] then /usr/sbin/service stop tftp.socket /usr/sbin/service disable tftp.socket fi # --------------------------------------------------------------------------- # 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}.* # --------------------------------------------------------------------------- # stop for update only # --------------------------------------------------------------------------- if ${update:-false} then exit 0 fi # --------------------------------------------------------------------------- # remove menu and config files # --------------------------------------------------------------------------- /var/install/bin/del-menu \ setup.services.menu \ setup.services.${package_name}.menu # --------------------------------------------------------------------------- # remove config file # --------------------------------------------------------------------------- configfiles="/etc/config.d/${package_name} /etc/backup.d/${package_name}.*" for cfile in ${configfiles} do rm -f ${cfile} done /usr/bin/systemctl --no-reload disable --now tftp.socket exit 0 # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------