123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #!/bin/bash
- ################################################################################
- # HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- ################################################################################
- ###<REPLACE>###
- source ${INSTALL_DIR}/etc/init.d/hpcc_common
- source ${INSTALL_DIR}/etc/init.d/init-functions
- removeSymlink ()
- {
- toDelete=$1
-
- rm -f ${toDelete} 2> /dev/null
- printf "Removing Symlink %-44s ..." "${toDelete}"
- if [ -L ${toDelete} ]; then
- log_failure_msg
- elif [ -e ${toDelete} ] && [ ! -L ${toDelete} ] ; then
- log_failure_msg
- else
- log_success_msg
- fi
- }
- if [ -e /etc/systemd/system/hpccsystems-platform.target ]; then
- removeSymlink "/etc/systemd/system/hpccsystems-platform.target"
- fi
- echo ""
- ## uninstalling files
- removeSymlink "/etc/init.d/dafilesrv"
- removeSymlink "/usr/bin/dfuplus"
- removeSymlink "/usr/bin/ecl"
- removeSymlink "/usr/bin/eclcc"
- removeSymlink "/usr/bin/eclplus"
- removeSymlink "/usr/bin/soapplus"
- removeSymlink "/usr/bin/testsocket"
- removeSymlink "/usr/bin/wuget"
- if [ -d ${INSTALL_DIR}/etc/bash_completion.d ] && [ -d /etc/bash_completion.d ]; then
- for subInstall in $(ls ${INSTALL_DIR}/etc/bash_completion.d | grep -v dpkg-tmp); do
- removeSymlink /etc/bash_completion.d/$subInstall
- done
- fi
- # locate sub uninstall files.
- if [ -d ${INSTALL_DIR}/etc/init.d/uninstall ]; then
- for subUnInstall in $(ls ${INSTALL_DIR}/etc/init.d/uninstall); do
- source ${INSTALL_DIR}/etc/init.d/uninstall/${subUnInstall}
- done
- fi
- if which systemctl 1>/dev/null 2>&1; then
- systemctl daemon-reload
- systemctl reset-failed
- fi
|