I figured out a way:
I used the
Termux plugin for Tasker. I had to put the script into
~/.termux/tasker from Termux's point of view.
That's
/data/data/com.termux/files/home/.termux/tasker .
And I had to make make sure that
/system/bin is in the path, and that the script has
755 permission.
Hmm ... actually, I can post the script here. It's a wrapper for the "cli" script that goes with the
LSPosed_mod utility (a new fork of LSPosed that enables its settings to be managed via the command
line, among other things that it enables, as well).
I hope that I don't mess up the markdown tags here, because Google groups doesn't offer a "preview"
function that I could use to verify what I entered ...
```
#!/system/bin/sh
export PATH=/system/bin:${PATH}
/system/bin/clear
# This "cli" utility needs to run as root.
su=/system/bin/su
cli=/data/adb/lspd/bin/cli
while true
do
echo
${su} - -c ${cli} -h
read cmd?'
>> ' rest
case "${cmd}" in
log|backup|modules|restore|scope|status)
# Valid command.
;;
''|q|quit|exit) # Line begins with an empty string in single quotes.
# Quit.
exit 0
;;
*)
# Invalid command. Just try again.
continue
;;
esac
echo
# Run the CLI command
${su} - -c ${cli} ${cmd} ${rest}
done
exit 0
```
I named the script lspd.sh, and I put it into /data/data/com.termux/files/home/.termux/tasker ,
and I set its perms to 755, as I described above.
When configuring the Termux plugin action in my Tasker action, I just specified lspd.sh as the
script to run, and I selected Execute in a terminal session.