Pascalscript execute fails
Posted: Sat Sep 27, 2025 4:12 pm
I'm trying to call a script from Pascalscript using this function.
This is on an Asustor NAS. Syncovery is running as root. The script has 755 permissions and runs fine when called from the cmdline. When called from Pascalscript as above I see this in the log
Executed /volume1/scripts/zabbix-db-backup.sh, Exit Code=1
If I try and use it from the Job -> Before field it also fails. I've tried prefixing the command with '/bin/ash -c ' but no luck there either. It even fails when the script simply contains an exit command.
The commands I have trying to run are all in /volume1/.@plugins/AppCentral/Syncovery/DATA/bin/authorized_cmdlines_syncovery
/usr/local/bin/docker exec -it postgresql-server pg_dump --format c --user zabbix --dbname zabbix >/tmp/zabbix.postgresql.dump
I have no idea what I'm doing wrong. Any help appreciated. Thanks.
Code: Select all
function OnProfileStart:Boolean;
begin
Execute('/volume1/scripts/zabbix-db-backup.sh', 60);
Result:=true;
end;Executed /volume1/scripts/zabbix-db-backup.sh, Exit Code=1
If I try and use it from the Job -> Before field it also fails. I've tried prefixing the command with '/bin/ash -c ' but no luck there either. It even fails when the script simply contains an exit command.
The commands I have trying to run are all in /volume1/.@plugins/AppCentral/Syncovery/DATA/bin/authorized_cmdlines_syncovery
The command I want to run from this script is this:/volume1/scripts/zabbix-db-backup.sh
/bin/ash -c /volume1/scripts/zabbix-db-backup.sh
ash -c /volume1/scripts/zabbix-db-backup.sh
/usr/local/bin/docker exec -it postgresql-server pg_dump --format c --user zabbix --dbname zabbix >/tmp/zabbix.postgresql.dump
I have no idea what I'm doing wrong. Any help appreciated. Thanks.