This set of steps is very rough and may not work for everyone. I may not be able to help if it doesn’t work, so apologies in advance if that’s the case!
How to autosync a git repo vault on Android:
This tutorial will assume you’ve already got a vault as a git repo using something like MGit to sync. If you’re wondering how to set this up, the friendly folk on Discord can probably lend a hand.
The third command will open a text editor like Nano. To sync your vault every 10 minutes just enter this (and adjust the folder & branch names as needed):
Save the file. If it’s using Nano like on my phone, to save a file it’s just CTRL + O then CTRL + X, using the CTRL button in the app
Note that you will need to have git credentials saved already, I think I did this by typing git config --global credential.helper store and then pushing manually and entering my username + password
I did this a couple months ago and it’s worked without hiccups since. It has no noticeable impact on battery life too. If anyone comes up with ways to simplify this method or any errors in the steps, I’m all ears!
It worked fine for a day then I once killed atermux accidently. When I started again it didn’t work. So I enabled it again, but it never worked again!!
Is it susceptible to such errors?
If I kill termux once, I need to uninstall the whole thing and reinstall again to get it to work?
@OliverBalfour
It happened again. I had to fix it after reinstalling the Termux App.
Is there a way to start the cron task again if Termux is killed by mistake?
I think termux-services is a second app altogether, if I remember correctly. Also, make sure you download Termux apps from Fdroid only. PlayStore versions are too old and won’t be updated as per Termux website.
I found this If you installed termux from google playstore or a very old version, then you will receive package command errors. Playstore builds are deprecated and no longer supported. Package-Management