mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-18 07:43:01 +08:00
debian prerm, fix condition expression
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
e23fa8c806
commit
c24d719600
@ -14,14 +14,17 @@ case $1 in
|
||||
rm /etc/systemd/system/rustdesk.service /usr/lib/systemd/system/rustdesk.service || true
|
||||
|
||||
# workaround temp dev build between 1.1.9 and 1.2.0
|
||||
serverUser=$(ps -ef | grep -E 'rustdesk +--server' | awk '{print $1}' | head -1)
|
||||
ubuntuVersion=$(grep -oP 'VERSION_ID="\K[\d]+' /etc/os-release | bc -l)
|
||||
waylandSupportVersion=21
|
||||
if [ "$serverUser" != "" ] && [ "$serverUser" != "root" ] && [ "$ubuntuVersion" -ge "$waylandSupportVersion" ]
|
||||
if [ "$ubuntuVersion" != "" ] && [ "$ubuntuVersion" -ge "$waylandSupportVersion" ]
|
||||
then
|
||||
systemctl --machine=${serverUser}@.host --user stop rustdesk || true
|
||||
fi
|
||||
rm /usr/lib/systemd/user/rustdesk.service >/dev/null 2>/dev/null || true
|
||||
serverUser=$(ps -ef | grep -E 'rustdesk +--server' | grep -v 'sudo ' | awk '{print $1}' | head -1)
|
||||
if [ "$serverUser" != "" ] && [ "$serverUser" != "root" ]
|
||||
then
|
||||
systemctl --machine=${serverUser}@.host --user stop rustdesk >/dev/null 2>&1 || true
|
||||
fi
|
||||
fi
|
||||
rm /usr/lib/systemd/user/rustdesk.service >/dev/null 2>&1 || true
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user