Slinger on my QNAP works using SysV initialization script. #618
patrodyne
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First, my thanks to GerryDazoo for providing his excellent Slinger project.
This is a description of my successful installation of the Slinger server on my QNAP TS-251+ Network Attached Storage (NAS) device.
General Audience
Of interest to a more general audience may be the SysV initialization script listed at the bottom of this discussion. I use that script to launch the Slinger service. That script should work on any
*nix
device with SysV initialization. Feel free to skip toslingbox_server.sh
, even if you are not a QNAP owner.QNAP Audience
QNAP NAS is a family of 24x7 file servers that feature a Linux based OS called QTS. There are many models and this discussion refers to the TS-251+. QTS provides a web console and SSH access. This discussion assumes that you are familiar with SSH and the QTS operating system. In particular, you should know that QTS uses BusyBox to provide the usual Linux CLI commands, common on embedded systems. QTS launches from firmware and configures the top-level file hierarchy (
/bin
,/etc
,/opt
,/usr
,/var
, ...) in memory and dynamically, on each reboot. BusyBox commands are often simpler and fewer than what you may know from a full Linux distro but are generally adequate. On start-up, the firmware can be augmented using QNAP'sautorun.sh
script and files from the NAS's shared persistent volumes.My Environment:
Python
In QTS, Python3 is installed from the web console as an application.
Slinger Installation
Download the Slinger zip to your NAS and
ssh
into it as the superuser (admin
). Unzip the archive to a folder on a permanent drive. For example,/share/CACHEDEV1_DATA/Slinger
. Configure Slinger using the setup instructions. Copy and paste theslingbox_server.sh
, listed at the bottom of this discusssion, into the same folder. Edit that script to configure thedir
andcmd
variables. Theuser
can be skipped when running the service asadmin
. Set permissions:Verify that
python3
is available:Next, test the new script:
SysV Initialization
On a typical SysV system, you create these symlinks to permanently start/stop your service when the system reboots:
However, these paths do not survive when QTS reboots. Thus, you need to learn about the QTS
autorun.sh
feature. An example of my script is listed below.RECOMMENDATION
If this is your first time using
autorun.sh
, I recommend that you start with a stub, like this:Then use the QTS web console to restart your NAS. My device takes 5-10 minutes to reboot, be patient! Use
ssh
to connect and display the kernel messages. Scroll and look for your messages. Hint:autorun.sh
runs out ofinit_nas
(at least on my TS-251+).Once, you verify that you have a functioning
autorun.sh
script then you can slowly add more commands.SysV Initialization: QTS
autorun.sh
General Audience
This SysV initialization script can be configured to start/stop your
slingbox_server.py
.SysV Initialization:
slingbox_server.sh
Beta Was this translation helpful? Give feedback.
All reactions