File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,11 @@ async function rebootSystem(): Promise<void> {
24
24
return ;
25
25
}
26
26
27
- const command = new Deno . Command ( " reboot" , {
28
- stdout : "piped" ,
29
- stderr : "piped"
30
- } ) ;
31
- await command . output ( ) ;
27
+ // Use absolute path to the reboot command
28
+ const command = new Deno . Command ( "/sbin/reboot" ) ;
29
+
30
+ // Spawn the process to run in the background and DO NOT await it.
31
+ command . spawn ( ) ;
32
32
} catch ( error ) {
33
33
console . error ( "Reboot command failed:" , error ) ;
34
34
throw error ;
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
+
3
+ # export essential GUI variables for systemd services
4
+ export DISPLAY=:0
5
+ export XDG_RUNTIME_DIR=/run/user/$( id -u)
6
+
7
+ # give the desktop a moment to settle
8
+ sleep 5
9
+
10
+ # check to ensure URLs are there to load
11
+ URLS=$( jq -r ' .urls | map(.url) | join(" ")' /opt/piosk/config.json)
12
+ if [ -z " $URLS " ]; then
13
+ echo " No URLs found in config.json. Exiting runner."
14
+ exit 0
15
+ fi
16
+
2
17
chromium-browser \
3
- $( jq -r ' .urls | map(.url) | join(" ") ' /opt/piosk/config.json ) \
18
+ $URLS \
4
19
--disable-component-update \
5
20
--disable-composited-antialiasing \
6
21
--disable-gpu-driver-bug-workarounds \
You can’t perform that action at this time.
0 commit comments