April 20, 2022, 2:48pm
Purpose of this is to use a bash script to execute a remote API post on a mid-tier docker container to change digital signage layouts for emergency events: shooter weather etc. from an extension → IVR/pin → IVR alert menu.
Can execute bash script as root successfully; but having issues running as asterisk user in terminal. I think I am missing something basic I think but do not know what to do next.
Related Info below that I think that is relevant:
File path and perms:
-rwxr-xr-x 1 asterisk asterisk 227 Apr 20 13:41 /var/lib/asterisk/bin/sshpass-test-alert.sh
exten => s,1,System(/var/lib/asterisk/bin/sshpass-test-alert.sh)
exten => s,n,Return
April 20, 2022, 2:57pm
Little short of stuff,
what does the script do?
Does it expect an argument?
What do the logs show?
April 20, 2022, 5:06pm
script ssh’s into another system and runs output there
still looking for logs pertaining to this
April 20, 2022, 5:20pm
To seemlessy ssh into another system you would need to have the ssh user’s public key copied to the servers authorized keys, have you done so for the asterisk user ?
Logs likely in
April 21, 2022, 8:08pm
Ty, I got the keys set and and running the commands via extensions_custom.conf
exten => s,1,System(ssh [email protected] ‘/some/script/path.sh’
seems to be working ok
May 22, 2022, 8:09pm
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.