Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c1c6b1

Browse files
committed
README: add example for how to start termux-services on boot
Similar to example found in termux-boot wiki page: https://wiki.termux.com/wiki/Termux:Boot
1 parent 0065adb commit 8c1c6b1

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,28 @@ all currently installed plugins.
2929
4. Put scripts you want to execute inside the `~/.termux/boot/` directory. If there are multiple files, they will be executed in a sorted order.
3030
5. Note that you may want to run `termux-wake-lock` as first thing if you want to ensure that the device is prevented from sleeping.
3131

32-
Example: To start an sshd server and prevent the device from sleeping at boot, create the following file at `~/.termux/boot/start-sshd`:
32+
### Examples
33+
34+
To start an sshd server and prevent the device from sleeping at boot,
35+
create the following file at `~/.termux/boot/start-sshd`:
3336

3437
```sh
3538
#!/data/data/com.termux/files/usr/bin/sh
3639
termux-wake-lock
3740
sshd
3841
```
3942

43+
To start
44+
[termux-services](https://wiki.termux.com/wiki/Termux-services), which
45+
in turn starts enabled services, you can put the following in
46+
`~/.termux/boot/start-services`:
47+
48+
```sh
49+
#!/data/data/com.termux/files/usr/bin/sh
50+
termux-wake-lock
51+
source /data/data/com.termux/files/usr/etc/profile.d/start-services.sh
52+
```
53+
4054
## License
4155

4256
Released under [the GPLv3 license](https://www.gnu.org/licenses/gpl.html).

0 commit comments

Comments
 (0)