/termux-boot

Termux add-on app allowing programs to be run at boot.

Primary LanguageJava

Termux:Boot

Join the chat at https://gitter.im/termux/termux

A Termux add-on app to run programs at boot.

When developing (or packaging), note that this app needs to be signed with the same key as the main Termux app in order to have the permission to execute scripts.

License

Released under the GPLv3 license.

How to use

  1. Install the Termux:Boot app.
  2. Start the Termux:Boot app once by clicking on its launcher icon. This allows the app to be run at boot.
  3. Create the ~/.termux/boot/ directory.
  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.
  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.

Example: To start an sshd server and prevent the device from sleeping at boot, create the following file at ~/.termux/boot/start-sshd:

termux-wake-lock
sshd