Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

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

fufesou2391b180468d
diff --git a/res/DEBIAN/postinst b/res/DEBIAN/postinst
index 6513d6eb0..eeeccaaec 100755
--- a/res/DEBIAN/postinst
+++ b/res/DEBIAN/postinst
@@ -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