Closed betson closed 6 years ago
@betson I am also running Termux on a Chromebook and I have no problem with chroot.
My boot script is located at .termux/boot/start-sshd
and contains:
termux-wake-lock
termux-chroot sshd
The ssh server is started in a chroot environnement and everything works fine.
I'm not sure how to proceed or do any more debugging. I've tried keeping Termux:Boot open during my Termux session and changing the name of the script in case start
was somehow a reserved word. Is there something I can do to test Termux:Boot in some way?
Hopefully this page https://wiki.termux.com/wiki/Termux:Boot will be of some use with this issue.
I'm not quite sure why, but I ended up combining everything I wanted started at boot into 1 start script...when I had 3 it seemed that only the final script (executed alphanumerically) would end up having it's services running. Here's what I ended up with to get my SSH server/MariaDB/Nginx all running at boot.
termux-wake-lock
sshd &
termux-chroot mysql.server start &
nginx &
I'm going to close this. I'm not sure how to debug, and this was really to just save me from typing a single command on start. So I'll just do that instead.
I've tried following the stated directions, but I can't get my boot scripts to run. This is on a Chromebook (Dell Chromebook 13 7310) running Android 7.1.1. I've installed and run the Termux:Boot app.
For testing purposes, I've tried running chmod 755 on the file, adding a
#!
declaration at the top, addingtermux-wake-lock
as the first statement, and changing the executed statement toecho 'hello'
.I'm not sure what I need to do to get the script to run. Based on the note on a prior issue, here is my
logcat -s termux:*
:I think those errors may be from exiting Termux via the Chrombook notification tray instead of the
exit
command. I am testing whether the script ran by checkingls /home
(or if the terminal says 'hello' on boot).