summarylogtreecommitdiffstats
path: root/otd
diff options
context:
space:
mode:
authorMoeLava2020-12-22 00:06:34 +0700
committerMoeLava2020-12-23 13:29:14 +0700
commit50ee5dba0605d7f422d445cecdd38f4a28cc615d (patch)
treee06ad1a31315425b258b2c6c2e41fb4ec8750b49 /otd
parentf2193622427b6e28a52339424d0d3a7bb194c24f (diff)
downloadaur-50ee5dba0605d7f422d445cecdd38f4a28cc615d.tar.gz
Packaging overhaul
- systemd service now has a grace period when restarting too many times - Daemon can be started without systemd by running "otd" - Add instructions and common error fixes to the install file
Diffstat (limited to 'otd')
-rwxr-xr-xotd19
1 files changed, 10 insertions, 9 deletions
diff --git a/otd b/otd
index a5538718440..246f692e41b 100755
--- a/otd
+++ b/otd
@@ -1,12 +1,13 @@
#!/bin/bash
-systemctl --user --quiet is-active opentabletdriver.service
-daemonactive=$?
-
-if [ $daemonactive != 0 ]
+cd /usr/share/OpenTabletDriver
+if [ $# -eq 0 ]
then
- echo "OpenTabletDriver Daemon not running, starting"
- systemctl --user start opentabletdriver.service
+ if [[ ! -v DISPLAY ]] && [[ ! -v WAYLAND_DISPLAY ]]
+ then
+ echo "DISPLAY and/or WAYLAND_DISPLAY is not set"
+ exit 1
+ fi
+ dotnet ./OpenTabletDriver.Daemon.dll -c ./Configurations
+else
+ dotnet ./OpenTabletDriver.Console.dll "$@"
fi
-
-cd /usr/share/OpenTabletDriver
-dotnet OpenTabletDriver.Console.dll "$@" \ No newline at end of file