Closed paulsavo1 closed 5 years ago
Hi, #!/bin/bash
isn't a valid shebang in termux (nothing exists at that location) so you need to change it to /data/data/com.termux/files/usr/bin/bash
.
Also make sure it is executable: chmod u+x path/to/your/script
cheers for response so is that what proper script look like
/data/data/com.termux/files/usr/bin/bash chmod u+x python /sdcard/sstvProxy/sstvProxy.py -hl
Well, almost.
Try
#!/data/data/com.termux/files/usr/bin/bash
python /sdcard/sstvProxy/sstvProxy.py -hl
And you might need to run chmod u+x ˜/.termux/boot/your_script_name
to make it executable.
does the chmod bit just get added after the 1st 2 lines?
Try without the chmod part first.
You can learn more about what it does here: https://askubuntu.com/questions/443789/what-does-chmod-x-filename-do-and-how-do-i-use-it
ok so its not starting on boot but the script is correct as when i manually input below into termux it runs my sstvProxy.py program so, is how can i actually get it to execute? im confused as when i type logcas - s termux:* it says that my sstvProxy.sh file is running
python /sdcard/sstvProxy/sstvProxy.py -hl
If the logcat says that it is running then I would assume that it is running but that something is wrong in the sstvProxy.py script
cheers can you point me to what it might be, the command to run the actual py file is just simply
python /sdcard/sstvProxy/sstvProxy.py - hl
so what should the script look like to run this in termux/boot
ok mate it is something to do with termux or termux boot although it is saying in logcat that it is running i dont think it is, as when i simple type ~/.termux/boot/sstvProxy.sh the program starts, so the script must be correct, is there something preventing it from opening
when i simple type ~/.termux/boot/sstvProxy.sh the program starts
What does "the program starts" mean? How are you verifying this? What does the script actually do?
I would try to replace the script with something else that is easy to verify, like
#!/data/data/com.termux/files/usr/bin/bash
echo `dateˋ >> ˜/boot.log
If that works then you know it is executed, if it doesn't work then the problem is with termux-boot
hi the script is supposed to input a python command at startup that i would normally have to input manually.
It is a program that runs a proxy iptv m3u8 url so i can access on other devices
I know the script seems to work as when i just input manually the folder it is located in, then the proxy program starts and data is sent to my devices
i am in work so i will try the other script when i get home
any idea mate?
How did the date
script go?
@paulsavo1 I'm still waiting for a report on how the date script went, did that work?
From your comment in https://github.com/termux/termux-tasker/issues/18 it sounds a bit like you've solved this issue, is that the case? Sharing the solution would then help others and you could close this issue to indicate that it is solved.
Hi im new to this and a bit lost, im trying to get a programm to run on start
i have created the boot folder and know how to copy .sh file into it and have used
logcat -s termux:* and can confirm that the .sh file is booting at startup but the program is not actually starting so im obviously not getting the script right
im trying to start a program called sstvProxy.py
it is located here /sdcard/sstvProxy/sstvProxy.py
what i have put in my .sh file is this
!/bin/bash
python /sdcard/sstvProxy/sstvProxy.py -hl
but it is not working
can someone please help as im really struggling