#!/bin/sh 

cd "${INSTALL_PATH}"
# Warning : The double "}" below is needed. It's due to a bug in izPack substitution: "{print $2}}" result was "{print $2"
export psid=`ps -ef | grep "adxd" | grep "\-s ${component.node.name}" |  grep -v "grep" | awk '{print $2}}'`
[[ $psid ]] && kill -9 $psid ||  echo "adxd ${component.node.name} not found"


# X3-284613 - Update from R095.002 : previous powershell file structure changed
if [ -d ebin/common_modules ]; then rm -rf ebin/common_modules; fi

if [ -f sem\semaphore.dat ]; then rm -f sem\semaphore.dat; fi
if [ -f "SAGE ERP X3 EULA FR".txt ]; then rm -f "SAGE ERP"*.txt; fi
if [ -f "SAGE ERP X3 EULA FR".htm ]; then rm -f "SAGE ERP"*.htm; fi

exit 0