-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
termux-boot scripts do not execute on termux-boot version 0.5 #34
Comments
I have the same issue gave up instructions are not clear at all. I tried putting in a new /com.termux/boot/myscript.rc per instructions (? Totally unclear instructions) and nothing happens at all.... |
Instructions are:
What is not clear here ?
Wrong directory. Should be exactly |
Yes I setup the script as you mentioned still won't run on boot. I can copy / paste the code from the sh file into a Termux SU or TSU terminal it runs fine. Just the on boot won't work. Does it need a sleep 30 or something added? The bizzare thing is I got the normal unprivileged terminal to run it with a chmod 777 which runs su in the .sh file. I could do the same from an su session. Then after rebooting none will run, su run before or not! What is going on. Worked in Widget and Terminal before a reboot ./script.rc. Even restored the exact file copies that worked. It still works if the code from the rc file is pasted into a Termux terminal, just not run as a script from the terminal. Is there another way to run other than ./script.rc? |
Im having this same issue on my tablet, my startup scripts are not starting on boot like they are supposed to, i ahve sect them up according to the instructions, both apps are installed from f-droid and up2date |
The instructions are probably obvious to people who know this inside out. If you are just following this as a how to format, then it is a bit light on detail. The Step 3. Create the ~/.termux/boot/ directory is what got me. Where exactly is ~/ ? As the termux terminal is nested in a fairly deep folder structure. Try these commands after starting termux terminal:
After editing and saving the file, try restarting your device. And then run this command to see if it worked:
Once you have got the files getting executed at boot the next step is to check that they are actually doing what you need them to. Hope this helps someone. |
I am a heavy Linux user,
Do the files Have to have the `.sh` extension? If so that may be where I'm
messing up.
…On Sun, Jul 28, 2019, 8:29 AM justoke ***@***.***> wrote:
The instructions are probably obvious to people who know this inside out.
If you are just following this as a how to format, then it is a bit light
on detail. The Step 3. Create the ~/.termux/boot/ directory is what got me.
Where exactly is ~/ ? As the termux terminal is nested in a fairly deep
folder structure.
Try these commands after starting termux terminal:
pwd
/data/data/com.termux/files/home - if this is not where you find yourself,
change to this path and then proceed as follows:
//Create the directories needed
mkdir .termux
mkdir .termux/boot
cd .termux/boot
//this creates an empty file
touch start.sh
chmod +x start.sh
//Edit the file to add your start up commands - I used nano editor like so
nano start.sh
After editing and saving the file, try restarting your device. And then
run this command to see if it worked:
logcat -s termux:*
//Should return something like:
07-28 15:53:08.742 1617 1617 T termux : Executed files at boot: start.sh //your file names should be seen
Once you have got the files getting executed at boot the next step is to
check that they are actually doing what you need them to. Hope this helps
someone.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#34?email_source=notifications&email_token=ACPQOXU6N4LVSAJCYZ5QWJ3QBW3M5A5CNFSM4HXFFY5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD27A4SQ#issuecomment-515771978>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACPQOXUWZGOQHCRPGKMGLQ3QBW3M5ANCNFSM4HXFFY5A>
.
|
It would help me if someone knew how to run with tsu or the sudo package at
boot. That I can't find documented anywhere. I've tried tsu outside
opening a Termux shell but it just won't set permissions on root required
mods (chmod + xyz echo > # chmod back to original format. Anyone have an
idea?
…On Sun, Jul 28, 2019, 9:20 PM Merith ***@***.***> wrote:
I am a heavy Linux user,
Do the files Have to have the `.sh` extension? If so that may be where I'm
messing up.
On Sun, Jul 28, 2019, 8:29 AM justoke ***@***.***> wrote:
> The instructions are probably obvious to people who know this inside out.
> If you are just following this as a how to format, then it is a bit light
> on detail. The Step 3. Create the ~/.termux/boot/ directory is what got
me.
> Where exactly is ~/ ? As the termux terminal is nested in a fairly deep
> folder structure.
>
> Try these commands after starting termux terminal:
> pwd
> /data/data/com.termux/files/home - if this is not where you find
yourself,
> change to this path and then proceed as follows:
>
> //Create the directories needed
> mkdir .termux
> mkdir .termux/boot
> cd .termux/boot
> //this creates an empty file
> touch start.sh
> chmod +x start.sh
> //Edit the file to add your start up commands - I used nano editor like
so
> nano start.sh
>
> After editing and saving the file, try restarting your device. And then
> run this command to see if it worked:
>
> logcat -s termux:*
> //Should return something like:
> 07-28 15:53:08.742 1617 1617 T termux : Executed files at boot: start.sh
//your file names should be seen
>
> Once you have got the files getting executed at boot the next step is to
> check that they are actually doing what you need them to. Hope this helps
> someone.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <
#34?email_source=notifications&email_token=ACPQOXU6N4LVSAJCYZ5QWJ3QBW3M5A5CNFSM4HXFFY5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD27A4SQ#issuecomment-515771978
>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/ACPQOXUWZGOQHCRPGKMGLQ3QBW3M5ANCNFSM4HXFFY5A
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#34?email_source=notifications&email_token=AECPVRRFEXPVLMN5DO3Y5BDQBZHWVA5CNFSM4HXFFY5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD27M6RA#issuecomment-515821380>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AECPVRQZZOF3FQIDANIBBE3QBZHWVANCNFSM4HXFFY5A>
.
|
That is what worked for me, but having the files in the right location is essential. |
I believe they can have any extension BTW as long as you chmod +x the files
…On Sun, Jul 28, 2019, 9:20 PM Merith ***@***.***> wrote:
I am a heavy Linux user,
Do the files Have to have the `.sh` extension? If so that may be where I'm
messing up.
On Sun, Jul 28, 2019, 8:29 AM justoke ***@***.***> wrote:
> The instructions are probably obvious to people who know this inside out.
> If you are just following this as a how to format, then it is a bit light
> on detail. The Step 3. Create the ~/.termux/boot/ directory is what got
me.
> Where exactly is ~/ ? As the termux terminal is nested in a fairly deep
> folder structure.
>
> Try these commands after starting termux terminal:
> pwd
> /data/data/com.termux/files/home - if this is not where you find
yourself,
> change to this path and then proceed as follows:
>
> //Create the directories needed
> mkdir .termux
> mkdir .termux/boot
> cd .termux/boot
> //this creates an empty file
> touch start.sh
> chmod +x start.sh
> //Edit the file to add your start up commands - I used nano editor like
so
> nano start.sh
>
> After editing and saving the file, try restarting your device. And then
> run this command to see if it worked:
>
> logcat -s termux:*
> //Should return something like:
> 07-28 15:53:08.742 1617 1617 T termux : Executed files at boot: start.sh
//your file names should be seen
>
> Once you have got the files getting executed at boot the next step is to
> check that they are actually doing what you need them to. Hope this helps
> someone.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <
#34?email_source=notifications&email_token=ACPQOXU6N4LVSAJCYZ5QWJ3QBW3M5A5CNFSM4HXFFY5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD27A4SQ#issuecomment-515771978
>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/ACPQOXUWZGOQHCRPGKMGLQ3QBW3M5ANCNFSM4HXFFY5A
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#34?email_source=notifications&email_token=AECPVRRFEXPVLMN5DO3Y5BDQBZHWVA5CNFSM4HXFFY5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD27M6RA#issuecomment-515821380>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AECPVRQZZOF3FQIDANIBBE3QBZHWVANCNFSM4HXFFY5A>
.
|
they are in the right spot with the right perms, think it might be a android 8.1/9/pie problem? |
I have added a shell script in "/data/data/com.termux/files/home/.termux/boot" called "start-sshd" with the correct interpreter and +x permissions, but the script is not executed at startup, nor is any error reported in the logs.
For debugging I took out everything in the script and just left in an output to file statement like this:
But there is no file "a1.log" generated in the home directory. When I inspect the logs with logcat -s termux:*. the only entries I see are:
The termux-boot process is started on the phone(As listed in Phone settings>Apps), how can I get more information on why it is failing to execute the script. Here is information about my phone from termux-info:
The text was updated successfully, but these errors were encountered: