#!/bin/sh
export PATH=/opt/lnxall_app/bin:/opt/lnxall_app/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
echo "Stop and remove the components of ubuslog ..."

if [ -f "/lib/systemd/system/ubuslog.service" ] ; then
	systemctl disable ubuslog tmpubuslog
	systemctl stop ubuslog tmpubuslog
fi

cd /usr/lib/systemd/system/
rm -v -f ubuslog.service tmpubuslog.service
rm -v -f /etc/ubuslog.json /etc/ubuslog.conf

systemctl daemon-reload
systemctl reset-failed ubuslog.service tmpubuslog.service 2>/dev/null

exit 0
