#!/bin/sh

systemctl stop dynamsoft.service
#systemctl disable dynamsoft.service

UNAME=`env | grep SUDO_USER | cut -d'=' -f2`
rm -rf /home/$UNAME/.config/autostart/dynamsoftservice.desktop
#new
rm -rf /home/$UNAME/.config/autostart/dynamsoftscanning.desktop
sed -i '/DynamsoftService/d'  /etc/profile

RPM_NAME=`rpm -qa DynamsoftService`
rpm -e $RPM_NAME

#rm -rf /usr/bin/DynamsoftServiceMgr
#rm -rf /usr/bin/DynamsoftCertCheckMgr
#rm -rf /opt/dynamsoft/DynamsoftService
