termux / termux-boot

Termux add-on app allowing programs to be run at boot.
https://f-droid.org/en/packages/com.termux.boot
931 stars 219 forks source link

Termux boot 0.7 not starting: workaround using Tasker #155

Open freebrowser1 opened 1 year ago

freebrowser1 commented 1 year ago

Problem description Termux boot does not run script at all

Steps to reproduce Create a script as described in the documentation in .termux/boot/ and do a chmod +x of that script. Put a line with date >> /data/data/com.termux/files/home/termux-boot which should log the current time at every reboot.

Expected behavior After reboot, the date is logged, but nothing is logged and other commands are not run as well.

Additional information

Screenshot 2023-05-29 at 12 26 43

(ignore the read clipboard file, only tasker-boot.sh is needed) Select as action Plugin => Termux and fill in a script.

Screenshot 2023-05-29 at 12 26 27

Open this action:

Screenshot 2023-05-29 at 12 26 10

Contents of the script:

#!/data/data/com.termux/files/usr/bin/sh

sshd
/data/data/com.termux/files/usr/bin/sv start httpd
/data/data/com.termux/files/usr/bin/sv start sshd
/data/data/com.termux/files/usr/bin/avahi-daemon &
mysqld &
date >> /data/data/com.termux/files/home/tasker-boot
termux-wake-lock 

This starts sshd, Apache, MariaDB, avahi and finally logs the current time to check whether the script has really run.

Qwert221 commented 1 year ago

Problem description Termux boot does not run script at all

Steps to reproduce Create a script as described in the documentation in .termux/boot/ and do a chmod +x of that script. Put a line with date >> /data/data/com.termux/files/home/termux-boot which should log the current time at every reboot.

Expected behavior After reboot, the date is logged, but nothing is logged and other commands are not run as well.

Additional information

  • Termux application version: 0.118
  • Android OS version: 10
  • Device model: Oneplus 6
Screenshot 2023-05-29 at 12 26 43

(ignore the read clipboard file, only tasker-boot.sh is needed) Select as action Plugin => Termux and fill in a script.

Screenshot 2023-05-29 at 12 26 27

Open this action:

Screenshot 2023-05-29 at 12 26 10

Contents of the script:

#!/data/data/com.termux/files/usr/bin/sh

sshd
/data/data/com.termux/files/usr/bin/sv start httpd
/data/data/com.termux/files/usr/bin/sv start sshd
/data/data/com.termux/files/usr/bin/avahi-daemon &
mysqld &
date >> /data/data/com.termux/files/home/tasker-boot
termux-wake-lock 

This starts sshd, Apache, MariaDB, avahi and finally logs the current time to check whether the script has really run.

```