~/.termux/boot/ 中的文件没有被运行
laisc7301 opened this issue · 2 comments
laisc7301 commented
Problem description
我在 ~/.termux/boot/ 目录下放了一个 "test" 文件并在文件中写入:
pure-ftpd -B -E -l puredb:$PREFIX/etc/pureftpd.pdb -S 0.0.0.0,3721
echo "It run!"
我重启了手机,进入了Termux,但是这段脚本并没有运行。
I reboot the phone and enter the Termux, but this script is not run.
Steps to reproduce
Expected behavior
Additional information
- Termux application version: 0.118.0 (118)
- Termux:Boot application version: 0.7 (7)
- Android OS version: 10
- Device model: KOZ-AL00
sylirre commented
I'd suggest you to do few things:
- Add shebang:
#!/data/data/com.termux/files/usr/bin/sh
. chmod +x
your script in~/.termux/boot/
directory.- Run
termux-wake-lock
before executingpure-ftpd
. - Change
echo "It run!"
toecho "It run!" > /data/data/com.termux/files/home/termux-boot.txt
. Reboot your device and check whether filetermux-boot.txt
appeared in your home directory.
Note that you need to open Termux:Boot application at least once by clicking on its launcher icon. https://wiki.termux.com/wiki/Termux:Boot
pu-007 commented
I solved the problem by rebooting the phone.
And I started Termux:Boot at first, after that I launched Termux.