You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: configuration/startup-shutdown.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ The `autostart.sh` script runs at the start of userspace boot. It can be used to
8
8
nano /storage/.config/autostart.sh
9
9
```
10
10
11
-
You can place any commands in the script, but note they will block the boot process until they complete, and the network stack will not be up when the script runs, so most uses of `autostart.sh` require you to "background" and delay the commands, e.g. the following script sleeps for 20 seconds and then runs a `kodi-send` command to update the video library.
11
+
You can place any commands in the script, but note they will block the boot process until they complete, so most uses of `autostart.sh` require you to "background" and delay the commands, e.g. the following script sleeps for 20 seconds and then runs a `kodi-send` command to update the video library.
12
12
13
13
```text
14
14
(
@@ -17,6 +17,8 @@ You can place any commands in the script, but note they will block the boot proc
17
17
)&
18
18
```
19
19
20
+
The network stack will be up when the script runs.
21
+
20
22
## autostop.sh
21
23
22
24
The `autostop.sh` script runs during the shutdown process, but before the network is shutdown. It does not exist by default, but you can create it using nano.
Like the `autostart.sh` script you can place any commands in the script, and they will block the shutdown process for up to 5 minutes and then will be terminated automatically.
29
31
32
+
`autostop.sh` is avalable as of LibreELEC 10.0.2 or LibreELEC 11 nightlies 2022-02-04.
33
+
30
34
## shutdown.sh
31
35
32
36
The `shutdown.sh` script run during the shutdown process. It does not exist by default, but you can create it using nano.
@@ -35,7 +39,7 @@ The `shutdown.sh` script run during the shutdown process. It does not exist by d
35
39
nano /storage/.config/shutdown.sh
36
40
```
37
41
38
-
Unlike the `autostart.sh` script, the `shutdown.sh` script should follow the following template to ensure commands are executed during the correct event, i.e. you can run different commands for a `reboot` event to `halt` event, or use the `*` as a catch-all.
42
+
Unlike the `autostart.sh` script the network stack will not be up when the script runs and the `shutdown.sh` script should follow the following template to ensure commands are executed during the correct event, i.e. you can run different commands for a `reboot` event to `halt` event, or put commands outside the `case ... esac` as a catch-all.
0 commit comments