fix: ubuntu 18.04, service, Exec format error (#8680)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou 2024-07-11 23:13:41 +08:00 committed by GitHub
parent b5a7165015
commit 2391b18046
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,6 +16,12 @@ if [ "$1" = configure ]; then
parsedVersion=$(echo "${version//./}")
mkdir -p /usr/lib/systemd/system/
cp /usr/share/rustdesk/files/systemd/rustdesk.service /usr/lib/systemd/system/rustdesk.service
# try fix error in Ubuntu 18.04
# Failed to reload rustdesk.service: Unit rustdesk.service is not loaded properly: Exec format error.
# /usr/lib/systemd/system/rustdesk.service:10: Executable path is not absolute: pkill -f "rustdesk --"
if [ -e /usr/bin/pkill ]; then
sed -i "s|pkill|/usr/bin/pkill|g" /usr/lib/systemd/system/rustdesk.service
fi
systemctl daemon-reload
systemctl enable rustdesk
systemctl start rustdesk