Post Reply 
 
Thread Rating:
  • 4 Vote(s) - 3.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto Rescan package for Synology users (formerly known as Auto Restart package)
06-01-2013, 13:00 (This post was last modified: 26-04-2016 18:29 by winxi.)
Post: #1
Auto Rescan package for Synology users (formerly known as Auto Restart package)
The MinimServer Auto Rescan package is an unofficial extension to MinimServer. It uses inotify-tools to monitor the MinimServer content directories and automatically initiates a MinimServer rescan when a file system event has been detected in the MinimServer content directory(ies). MinimServer 0.8.4 or higher and inotify-tools are required. You can download the package from the attachment at the bottom of this post.

Installation
You can install this package by choosing 'Manual Install' in the Synology package center. The package requires MinimServer 0.8.4 or above and inotify-tools to be installed. You can install inotify-tools for example from this repository: http://synology.francis-besset.com/
The Auto Rescan package works with all Synology DS models supported by MinimServer, as long as inotify-tools is available.

Usage
You can conveniently uninstall, upgrade, start or stop the package and view the log file using the Synology package center.

Mode of operation
When starting the package, it extracts the name(s) of the MinimServer content directory(ies) from the MinimServer config file and establishes watches for this(ese) directory(ies). This process may take a while and is finished when "Watches established." appears in the package log file. Please note that the log doesn't refresh automatically when you view it in the Synology package center. To update it you have to close and reopen the log window.
As soon as inotify detects a file system event in the watched directories, a 10 seconds timer will be started. If inotify detects no other event during the timer interval, a MinimServer rescan will be initiated. If another event has been detected during the timer interval, the timer will be reset and run another 10 seconds.

Notes/limitations
  • The Auto Rescan package requires the MinimServer package 0.8.4 or above to be installed at your Synology DS.
  • When the Auto Rescan package automatically initiates a MinimServer rescan, it happens the same as if you would do it manually. This means that MinimServer will not be visible to control points during the rescan phase but you should be able to continue playing the current playlist.
  • When you change the MinimServer content directory(ies) (the MinimServer contentDir property), you have to restart MinimServer manually and also have to restart the Auto Rescan package manually using the Synology package center. The latter step is required because the Auto Rescan package does determine the MinimServer content directories only on startup.


Changelog
  • v1.1, 26.04.2016
    - the maximum amount of inotify watches per user is set to 102400 if the current value is lower
    - hidden files (beginning with a dot) are excluded from the watches
    - improved logging
  • v1.0, 24.04.2016
    - the package name changed from Auto Restart to Auto Rescan.
    - the package now uses command scripting (introduced in MinimServer 0.8.4) for communication with MinimServer instead of the deprecated named pipe.
    - the package does not use a daemon user anymore.
    - the installer does not attempt to download and compile inotify-tools anymore.
    - the possibility to configure the package in the not very user-friendly config file has been removed in favor of some hard-coded, reasonable default values.
    - the size of the log file is now limited to 500kB.
  • v0.9, 31.08.2014
    - added a more robust check for the user home service being enabled.
  • v0.8, 11.03.2014
    - compatibility changes for DSM 5.0 and MinimServer 0.8.1b. This version requires MinimServer 0.8.1b or later.
  • v0.7, 24.01.2014
    - fixed a broken bootstrap link for the 88f6282 architecture
  • v0.6, 17.12.2013
    - updated the package to be compatible with MinimServer version 0.8.1 or higher
  • v0.5, 13.08.2013
    - fixed a problem where the MinimServer status could not be retrieved when using MinimServer in combination with the Synology Java Manager
    - fixed a bug related to loading the default settings
  • v0.4, 15.06.2013
    - new default settings: restartBehaviour (forceRestart), firstTimeout (2), restartTimeout (10)
    - the package now enables the 'User home service' automatically if required
    - improved logging
  • v0.3, 06.03.2013
    - fixed incompatibility issue with DSM 4.2
    - removed dependency on the MinimServer package
  • v0.2e, 09.02.2013
    - added support for cedarview architecture
  • v0.2d, 28.01.2013
    - added support for Synology 2013 PPC models
  • v0.2b, 16.01.2013
    - added a dependency on the MiniMServer package with a version number of 0.63.3 or above
  • v0.2, 12.01.2013
    - the package now uses the dedicated daemon user 'minimautorestart'
    - added configuration properties
    - changed the Minimserver status and inotify events retrieving method
    - properly handle content directories containing spaces
    - improved logging
  • v0.1b, 08.01.2013
    - fixed the status retrieving method to be more robust
    - improved logging during installation
  • v0.1, 06.01.2013
    - initial release


DISCLAIMER: This package is provided 'as is' and doesn’t include any kind of warranty.


Attached File(s)
.spk  AutoRescan-1.1.spk (Size: 50 KB / Downloads: 152)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Auto Rescan package for Synology users (formerly known as Auto Restart package) - winxi - 06-01-2013 13:00

Forum Jump:


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