link /usr/bin/rustdesk even for init system

This commit is contained in:
rustdesk 2023-11-23 21:56:36 +08:00
parent fa8e0ed27b
commit 84a21d72b9
2 changed files with 2 additions and 2 deletions

View File

@ -5,9 +5,9 @@ set -e
if [ "$1" = configure ]; then
INITSYS=$(ls -al /proc/1/exe | awk -F' ' '{print $NF}' | awk -F'/' '{print $NF}')
ln -s /usr/lib/rustdesk/rustdesk /usr/bin/rustdesk
if [ "systemd" == "$INITSYS" ]; then
ln -s /usr/lib/rustdesk/rustdesk /usr/bin/rustdesk
if [ -e /etc/systemd/system/rustdesk.service ]; then
rm /etc/systemd/system/rustdesk.service /usr/lib/systemd/system/rustdesk.service /usr/lib/systemd/user/rustdesk.service >/dev/null 2>&1

View File

@ -5,9 +5,9 @@ set -e
case $1 in
remove|upgrade)
INITSYS=$(ls -al /proc/1/exe | awk -F' ' '{print $NF}' | awk -F'/' '{print $NF}')
rm /usr/bin/rustdesk
if [ "systemd" == "${INITSYS}" ]; then
rm /usr/bin/rustdesk
systemctl stop rustdesk || true
systemctl disable rustdesk || true