Llink:synology autostart: Difference between revisions

From Lundman Wiki
mNo edit summary
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 20: Line 20:
if [ "$1" = "stop" ]; then
if [ "$1" = "stop" ]; then
       killall llink
       killall llink
      killall unrar #Normally llink should clean up spawned unrar, this line is just to make sure
   exit 0
   exit 0
fi
fi


#Make sure this is the correct path to llink:
#Make sure this is the correct path to llink:
llink="/volume1/llink-2.0/llink/src/llink"
llink="/volume1/llink-2.0.8_x06_ppc/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:
Line 33: Line 32:
</pre>
</pre>


Login as root on your NAS. Save the script as <code>S89llink.sh</code> and place it in your llink directory, eg. <code>/volume1/llink-X.Y.Z-synology_x06_ppc/</code>. Don't use notepad, make sure it's a UNIX compliant editor, such as '''vi''' which is available on the NAS.
Put a link to this script in the <code>/etc/rc.local</code> file: <code>/volume1/llink-X.Y.Z-synology_x06_ppc/S89llink.sh  # llink streaming media server</code>


Put this script in the <code>/usr/syno/etc.defaults/rc.d/</code> folder with the name <code>S89llink.sh</code>, for instance using '''vi'''.
Change the permissions: <code>$ chmod 755 /volume1/llink-X.Y.Z-synology_x06_ppc/script/S89llink.sh</code>


Change the permissions: <code>$ chmod 777 /usr/syno/etc.defaults/rc.d/S89llink.sh</code>
And then llink shall start after reboot. You will see "llink-daemon" among the media sources listed on the NMT media extender.


And then it shall appear after reboot!


=== Notes ===
Linux is cAsE sEnsitiVe!
Update the script with the right version (X.Y.Z) and the right cpu family (x06_ppc or x07_arm).


=== Notes ===
The script should not brake after a firmware update, but make sure you have a copy.
It is not confirmed if the script brakes or disappears after a firmware update. Make sure you have a copy.
If you want to run another skin from boot than the default Aquarius_720, change like this:
<pre>
cd  `dirname $llink` && ./llink || echo "$llink or its directory doesn't exist, and check permissions!"
</pre>
to
<pre>
cd  `dirname $llink` && ./llink -f jukebox.conf || echo "$llink or its directory doesn't exist, and check permissions!"
</pre>
 
Eg. just add <code>-f <skin conf filename></code>

Latest revision as of 08:35, 19 June 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
   exit 0
fi

#Make sure this is the correct path to llink:
llink="/volume1/llink-2.0.8_x06_ppc/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

Login as root on your NAS. Save the script as S89llink.sh and place it in your llink directory, eg. /volume1/llink-X.Y.Z-synology_x06_ppc/. Don't use notepad, make sure it's a UNIX compliant editor, such as vi which is available on the NAS. Put a link to this script in the /etc/rc.local file: /volume1/llink-X.Y.Z-synology_x06_ppc/S89llink.sh # llink streaming media server

Change the permissions: $ chmod 755 /volume1/llink-X.Y.Z-synology_x06_ppc/script/S89llink.sh

And then llink shall start after reboot. You will see "llink-daemon" among the media sources listed on the NMT media extender.


Notes

Linux is cAsE sEnsitiVe!

Update the script with the right version (X.Y.Z) and the right cpu family (x06_ppc or x07_arm).

The script should not brake after a firmware update, but make sure you have a copy. If you want to run another skin from boot than the default Aquarius_720, change like this:

cd  `dirname $llink` && ./llink || echo "$llink or its directory doesn't exist, and check permissions!"

to

cd  `dirname $llink` && ./llink -f jukebox.conf || echo "$llink or its directory doesn't exist, and check permissions!"

Eg. just add -f <skin conf filename>