Llink:synology autostart: Difference between revisions

From Lundman Wiki
mNo edit summary
mNo edit summary
Line 9: Line 9:
<pre>
<pre>
#!/bin/sh
#!/bin/sh


# This script is made available under the GPLv2 terms.
# This script is made available under the GPLv2 terms.
# Written 2008 by Daniel Cervera, dc11ab (at) gmail (dot) c
# Written 2008 by Daniel Cervera, dc11ab (at) gmail (dot) com
# With kind help from lundman and Kalle Anderssonn
# With kind help from lundman and Kalle Andersson
# Version 1.1
# Version 1.1
# This enables autostart of the llink media server on Synology NAS.
# This enables autostart of the llink media server on Synology NAS.
Line 25: Line 24:
fi
fi


#Make sure there is the correct path to llink!
#Make sure this is the correct path to llink:
llink="/volume1/llink-2.0/llink/src/llink"
#Make sure this is the correct path to llink!
llink="/volume1/llink-2.0/llink/src/llink"
llink="/volume1/llink-2.0/llink/src/llink"


#Check if llink exist; if so then run it, else say that it didn't work
#Check if llink exist; if so then run it, else say that it didn't work:
cd  `dirname $llink` && ./llink || echo "$llink or its directory doesn't exist, and check permissions!"
cd  `dirname $llink` && ./llink || echo "$llink or its directory doesn't exist, and check permissions!"



Revision as of 11:35, 20 February 2008

Autostarting llink on a Synology NAS

If you want to autostart llink upon boot in your NAS you may use this script.
It is confirmed to work on a CS-406 with firmware 518, but in theory it would work for all x07 and x06 models.


NOTES
Make sure you change the path to llink correctly in the script below.
You use this script at your own risk, the author will not be liable for any problems derived from using this script.

#!/bin/sh

# This script is made available under the GPLv2 terms.
# Written 2008 by Daniel Cervera, dc11ab (at) gmail (dot) com
# With kind help from lundman and Kalle Andersson
# Version 1.1
# This enables autostart of the llink media server on Synology NAS.
# Look at lundman.net or networkedmediatank.com for more information.

# Make sure we have a clean start
if [ "$1" = "stop" ]; then
       killall llink
       killall unrar #Normally llink should clean up spawned unrar, this line is just to make sure
   exit 0
fi

#Make sure this is the correct path to llink:
llink="/volume1/llink-2.0/llink/src/llink"

#Check if llink exist; if so then run it, else say that it didn't work:
cd  `dirname $llink` && ./llink || echo "$llink or its directory doesn't exist, and check permissions!"

# End of script


Put this script in the /usr/syno/etc.defaults/rc.d/ folder with the name S89llink.sh, for instance using vi.

Change the permissions: $ chmod 777 /usr/syno/etc.defaults/rc.d/S89llink.sh

And then it shall appear after reboot!


Notes

It is not confirmed if the script brakes or disappears after a firmware update. Make sure you have a copy.