Run command detached from SSH (Linux/SSH/iOS Shortcuts)

lewiss

New Member
Joined
Jan 20, 2020
Messages
13
Reaction score
5
Credits
50
Hello,

I'm sorry if this is the wrong section/place to post this!


I've got a PiHole, an have set up some iOS Shortcuts to control it over SSH.

I've set up a script that disables Blocking, and then runs another script that waits one hour and reenables it.

Shortcuts seems to keep running, following the 1hr delay script that i though would run detached. Any ideas on how to run the script without iOS Shortcuts thinking the script is still running?

Code snippets and screenhots blow:

Disable Script Ran by Shortcuts
pihole disable curl --data "param1=value1&param2=value2" https://maker.ifttt.com/trigger/pihole_disabled/with/key/b7*********************2o bash pihole-enable-delay &


Delay + Enable script
sleep 3600 pihole enable curl --data "param1=value1&param2=value2" https://maker.ifttt.com/trigger/pihole_enabled/with/key/b****************p597-Z4lsit2o exit

iOS Shortcut
652722514_signal-2020-01-20-62031pm.png.7842855ef7c8d3cc44600827287e518d.png

Thanks!
 


Hi,

Could you please give more detail, are you using Python 2.8 or 3?

Davi
 
Sound, run a VM and Distro you prefer of a USB or SD card.

Run script through Charm and snapshot to debug..... easy!
 
Sound, run a VM and Distro you prefer of a USB or SD card.

Run script through Charm and snapshot to debug..... easy!

I think you misunderstood, i'm sorry.

I'm trying to run a script/proccess detached from an SSH session, as in When I run the command over SSH in Shortcuts, the 1hr delay script is ran in a seperate (session/process) so iOS shorcuts thinks theres nothing else running and exits
 
LOL

Sorry, yes. I thought you were having problems with Python 3.
 
If not you can always re-script in Python Idle.

If I rescripted in IDLE, which looks possible, how will I run the script so iOS Shortcuts thinks the SSH session is over and terminates?

Thanks for your help.
 
Look on youtube, there is a 4hr Python Class that covers this. If you need link I can send.
 
 
Sent the search, I don't know your level of Python. If you get stuck, post it here?
 


Top