#!/bin/sh #------------------------------------------------------------------------------ # /var/install/config.d/conan-server.sh - deinstall script # # Creation : 2023-02-02 dv # Last Update: 2023-08-31 21:35:59 # # 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. #------------------------------------------------------------------------------ # include eislib . /var/install/include/eislib package_name="conan-server" #---------------------------------------------------------------------------- # check if we are updating #---------------------------------------------------------------------------- if [ "$1" = "--update" ] || [ "$1" = "update" ] then update="true" else update="false" fi #---------------------------------------------------------------------------- # stop service #---------------------------------------------------------------------------- /usr/sbin/service --quiet stop ${package_name} #---------------------------------------------------------------------------- # remove file not in file list #---------------------------------------------------------------------------- rm -f /etc/default.d/${package_name} rm -f /etc/check.d/${package_name} rm -f /etc/check.d/${package_name}.* #---------------------------------------------------------------------------- # remove config and menu entry if not updating #---------------------------------------------------------------------------- if [ "${update}" = "false" ] then # disable and remove systemd services /usr/sbin/service disable ${package_name} rm -f /usr/lib/systemd/system/conan-server.service /usr/sbin/service daemon-reload rm -f /etc/config.d/${package_name} rm -f /etc/backup.d/${package_name}* rm -f /var/log/${package_name}_*.log /var/install/bin/del-menu setup.services.menu setup.services.${package_name}.menu fi exit 0