2014-10-10 15:52:47 +00:00
|
|
|
#!/bin/bash
|
2017-12-26 20:36:30 +00:00
|
|
|
# $Id:$
|
2010-08-02 12:47:55 +00:00
|
|
|
|
2017-12-26 20:36:30 +00:00
|
|
|
set -e
|
2010-08-02 12:47:55 +00:00
|
|
|
|
2017-12-26 20:36:30 +00:00
|
|
|
user_exists=$(id -u fhem > /dev/null 2>&1; echo $?)
|
|
|
|
if [ "$user_exists" -eq "0" ]; then
|
|
|
|
echo "deleting user fhem"
|
2010-09-30 13:12:28 +00:00
|
|
|
userdel fhem
|
2010-08-02 12:47:55 +00:00
|
|
|
fi
|
2010-09-30 13:12:28 +00:00
|
|
|
|
2010-08-02 12:47:55 +00:00
|
|
|
if test -f /etc/init/fhem.conf; then
|
2010-09-30 13:12:28 +00:00
|
|
|
rm /etc/init/fhem.conf
|
|
|
|
fi
|
2014-10-08 18:17:37 +00:00
|
|
|
|
2017-12-25 18:47:43 +00:00
|
|
|
if test -f /etc/init.d/fhem; then
|
|
|
|
rm /etc/init.d/fhem
|
2010-08-02 12:47:55 +00:00
|
|
|
fi
|
2017-12-26 20:36:30 +00:00
|
|
|
|
|
|
|
if test -f /etc/systemd/system/fhem.service; then
|
|
|
|
rm /etc/systemd/system/fhem.service
|
|
|
|
fi
|