summarylogtreecommitdiffstats
path: root/otd
diff options
context:
space:
mode:
Diffstat (limited to 'otd')
-rwxr-xr-xotd19
1 files changed, 10 insertions, 9 deletions
diff --git a/otd b/otd
index a55387184404..246f692e41b8 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