-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·41 lines (33 loc) · 1.01 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# Dieses Script sollte nur ein einziges Mal aufgerufen werden! Alle weiteren
# Aufrufe bitte mit dem Script ./update.sh durchführen.
# Exit on error or variable unset
set -o errexit -o nounset
# Programmdateien installieren
cp -v ./target/release/xmz_mod_touch_gui /usr/bin/xmz-mod-touch-gui
# Systemd Unit File anlegen
cat <<EOF | tee /etc/systemd/system/xmz-mod-touch-gui.service
#
# xMZ-Mod-Touch-GUI systemd unit file
#
[Unit]
Description="xMZ-Mod-Touch-GUI (Graphical User Interface) der 'xMZ-Mod-Touch'-Platform"
# Wants=syslog.target dbus.service
After=weston.service
[Service]
Environment=XDG_RUNTIME_DIR=/run/user/root
Environment=LD_LIBRARY_PATH=/usr/lib
Environment=GDK_BACKEND=wayland
Environment=XMZ_HARDWARE=0.1.0
Environment=LANG=de_DE.UTF-8
ExecStart=/usr/bin/xmz-mod-touch-gui
Restart=always
RestartSec=10
[Install]
Alias=xmz-gui.service
WantedBy=graphical.target
EOF
# Unit aktivieren ...
systemctl enable xmz-mod-touch-gui.service
# Unit starten
systemctl restart xmz-mod-touch-gui.service