Post Reply 
Auto Rescan package for Synology users (formerly known as Auto Restart package)
16-01-2015, 21:31 (This post was last modified: 22-11-2019 17:44 by DLNABubble.)
Post: #142
RE: Auto Restart package for Synology users
[edit] See update at the end of this post:

I've got the auto-restart package installed after cross-compiling the inotify-tools for my DS409slim myself using spksrc. (https://github.com/SynoCommunity/spksrc)

Since I slapped together this package rather quickly, it is far from installable.
Anyway, all I was interested in at the moment are the binaries which I copied manually to my disc station:
inotifywait and inotifywatch to /usr/bin/
libinotifytools.so.0.4.1 to /usr/lib/ (plus created the symbolic link libinotifytools.so.0 referencing it).

A quick test proofed the auto start package to be working.

Looking at /etc/passwd I found the home directory for the user "minimautorestart" to be living at "/var/services/homes/minimautorestart"

This is where the log files on my box are to be found too.
The reason for the failed installation is a SSL issue preventing the inotify-tools source from beeing downloaded:
Code:
Location: https://github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz [following]
--17:55:28--  https://github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz
           => `inotify-tools-3.14.tar.gz'
Connecting to github.com|192.30.252.130|:443... connected.
WARNING: Certificate verification error for github.com: unable to get local issuer certificate
HTTP request sent, awaiting response... 302 Found
Location: https://cloud.github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz [following]
--17:55:29--  https://cloud.github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz
           => `inotify-tools-3.14.tar.gz'
Resolving cloud.github.com... 54.192.46.184, 54.230.47.233, 54.192.46.204, ...
Connecting to cloud.github.com|54.192.46.184|:443... connected.
OpenSSL: error:14077410:lib(20):func(119):reason(1040)
Unable to establish SSL connection
A slightly newer version for DSM 4.2 for my disc station model is available which could possibly solve this issue - maybe (my model is EOL what newer DSM version is concerned).

Having created the spksrc module, I might as well share it with others.
Out of curiosity and since some others where asking for it on this thread, I just compiled it for the x86 architecture and the DSM 5.0 toolchain.
Good news first: It did compile!
In case anyone wants to have a go:

Code:
git clone https://github.com/cyc1ingsir/spksrc.git
git checkout inotify-tools

# this is needed only once
docker pull synocommunity/spksrc

# assuming you have cloned the source directly to your home directory
docker run -it -v ~/spksrc:/spksrc synocommunity/spksrc /bin/bash
cd spk/inotify-tools/
make arch-x64-6.1 # <- insert the arch for your disk station here (https://github.com/SynoCommunity/spksrc/wiki/Architecture-per-Synology-model)
You'll will then find the binaries at the subfolder "work-x64-6.1/install/usr/local/inotify-tools"

The installable package can be found at spksrc/packages/inotify-tools_x64-6.1_1.0.0-1.spk

So a really big thankyou to @winxi for creating the minimautorestart package!

Previously I used a miniDLNA and really would have missed new recordings beeing added automatically to the library.
Having had some problems with miniDLNA (having to rescan the my library every now and then and sometimes the service not responding as well as preventing the HDDs in the disc station from going to sleep as I noticed just the other day), I'm currently evaluating MinimServer.
Combined with the auto restart package it is looking quite nicely so far.
However, something I always wanted to look at for miniDLNA was to try to add a feature that I could rescan subfolder of my audio library only.

Why in my opinion the restart may be quite annoying from time to time I will elaborate in another post.
At the moment I just want to ask: Wouldn't it be nice if the autorestart package was able to tell MinimServer that a change had ocured in a specific subfolder of the audio library being served and hence MinumServer would rescan this part of the library only?

[edit - November 2019]
I just updated the above instructions within the code section - 4.8 years after initially posting it.
I need to upgrade our old disk station shortly. So I'd rather get this going.
What have I achieved so far:

I was able to install the created inotify-tools package. With this in place, i was able to install winxi's auto restart package.

However, I was only able to test it on a disk station with DSM 6.2.2 installed. Your results may vary. Also I haven't tested if the auto restart package still restarts the MinimServer.
So please use it with caution!
It would be nice if someone else could test it too.
The placement of the binaries (tools and library) on the disk station's file system needs to be verified.
I hopefully find the time to make a PR against the SynoCommunity project this time round. This would enable us to install the package from the SynoCommunity package repository.

I must admit, I did hope not to need the tools and the restart package any longer. I still patiently waiting for:
Quote:In a future version of MinimServer, I am hoping to incorporate automatic detection of changes to the library without requiring a server restart.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Auto Restart package for Synology users - DLNABubble - 16-01-2015 21:31

Forum Jump:


User(s) browsing this thread: 4 Guest(s)