bashscheduled-taskssynology

Synology Scheduled Task fails running simple command with 'no such file'


I'm trying to run a simple bash script using Scheduled Tasks on a Synology NAS. It fails interpreting an argument as a file.

OS: DSM 7.1.1-42962 Update 6

The 'user-defined script' in Scheduled Tasks:

/bin/bash /volume1/backup/fossil/start_fossil.sh

start_fossil.sh:

#!/bin/bash
cd /volume1/@appstore/fossil-scm/bin
fossil server --port 8080 /volume1/backup/fossil/fossil --https

Output: no such file: server

I don't understand why the argument server is interpreted as a file. If I run the script with ./start_fossil.sh or bash start_fossil.sh it just works. It also works if I run the command directly in my shell. I tried several options with different quotes around the command or the arguments to no avail.

Any advice?


Solution

  • My Synology model is DS918+ and for some weird reason, Synology decided to force owners of some models, including mine, to update to v7.2 manually and not even notify them. After manually updating my NAS to DSM 7.2.1-69057 Update 5, the Scheduled Task just works. Seems it was a problem with the previous version.