Re: Macro result was 512


Steve N4IRS
 

Hans,
It may just be a typo in the message.
You said that you created a script called dvsm-restart.sh in /opt/MMDVM_Bridge/

In AB.ini
B1 = /opt/MMDVM_Bridge/dvswitch-restart.sh
B2 =sudo /opt/MMDVM_Bridge/dvswitch-restart.sh

Do you have a filename issue?

Steve N4IRS


On 3/11/23 08:01, Hans AB5HM wrote:

Hi there...
my STFU is occatioanlly stopping and i am trying to setup a macro to restart the service remotely from DVSM.

I therefore created a script called dvsm-restart.sh in /opt/MMDVM_Bridge/  with the following content:

sudo -S < <(echo "<xxxxx>") systemctl restart stfu
sudo -S < <(echo "<xxxxx>") systemctl restart analog_bridge

This script is working fine, when executed from the command line.

I then added the macro to the Analog_Bridge.ini:

B1 = /opt/MMDVM_Bridge/dvswitch-restart.sh
B2 =sudo /opt/MMDVM_Bridge/dvswitch-restart.sh


The script is firing, but not executing. Here the result from the Analog_Bridge.log:

I: 2023-03-11 12:58:51.506 Tune macro: *B1 will invoke "/opt/MMDVM_Bridge/dvswitch-restart.sh"
I: 2023-03-11 12:58:51.511 Macro result was 512
I: 2023-03-11 12:58:58.644 Tune macro: *B2 will invoke "sudo /opt/MMDVM_Bridge/dvswitch-restart.sh"
I: 2023-03-11 12:58:58.689 Macro result was 512


Any idea or hint what i am doing wrong?

Hans
AB5HM

Join {main@DVSwitch.groups.io to automatically receive all group messages.