Running a sh file on Synology

I’ve a Synology NAS box running with an ARM71. I installed a Blynk server which is running only when I’m connected via Putty. When I disconnect myself from the NAS server, Blynk stops running. To ensure the Blynk server is running, a is created to be executed every 5 minutes via cron.

My Blynk files are stored in a blynk folder at volume1/blynk/

When the following watchdog file is executed, a command not found error is generated. Its function is to check if the blynk server is running and if not, execute it.

I’m not keen in Linux so any help is appreciated.


#Watchdog script for blynk server
stat=`/bin/ps -aux | /bin/grep -c "blynk"`
if [ $stat -lt "2" ]; then
/usr/local/bin/java -jar /volume1/blynk/$server -serverConfig /volume1/blynk/ -dataFolder /volume1/blynk/ &