forked from freebsd/freebsd-ports
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autoscan replaces the default Plex and Emby behaviour for picking up file changes on the file system. Autoscan integrates with Sonarr, Radarr, Lidarr and Google Drive to fetch changes in near real-time without relying on the file system. PR: 258873
- Loading branch information
Showing
7 changed files
with
107 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
PORTNAME= autoscan | ||
DISTVERSIONPREFIX= v | ||
DISTVERSION= 1.2.0 | ||
CATEGORIES= net-p2p linux | ||
MASTER_SITES= https://github.com/Cloudbox/autoscan/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/ | ||
DISTNAME= ${PORTNAME}_${DISTVERSIONPREFIX}${DISTVERSION}_linux_amd64 | ||
EXTRACT_SUFX= | ||
EXTRACT_ONLY= | ||
|
||
MAINTAINER= [email protected] | ||
COMMENT= Scan Plex library on webhook triggers | ||
|
||
LICENSE= MIT | ||
|
||
ONLY_FOR_ARCHS= amd64 | ||
|
||
USES= linux | ||
USE_RC_SUBR= autoscan | ||
|
||
CONFLICTS_INSTALL= autoconf-wrapper | ||
|
||
NO_BUILD= yes | ||
SUB_LIST= GROUPS=${GROUPS} \ | ||
USERS=${USERS} | ||
|
||
NO_WRKSUBDIR= yes | ||
|
||
USERS= autoscan | ||
GROUPS= autoscan | ||
|
||
PLIST_FILES= bin/autoscan | ||
|
||
do-install: | ||
${INSTALL_PROGRAM} ${DISTDIR}/${DISTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} | ||
|
||
.include <bsd.port.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TIMESTAMP = 1633181844 | ||
SHA256 (autoscan_v1.2.0_linux_amd64) = 3ae59ec61298159e50882ebb8efe159ff8c4da55aa7325afc3f3f603c498e4a3 | ||
SIZE (autoscan_v1.2.0_linux_amd64) = 11227136 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/sh | ||
# | ||
# Author: Michiel van Baak <[email protected]> | ||
# | ||
# PROVIDE: autoscan | ||
# REQUIRE: LOGIN | ||
# KEYWORD: shutdown | ||
|
||
# Add the following lines to /etc/rc.conf to enable autoscan: | ||
# autoscan_enable: Set to NO by default. Set it to YES to enable it. | ||
# autoscan_user: The user account autoscan daemon runs as what | ||
# you want it to be. Default: autoscan | ||
# autoscan_group: The user group autoscan daemon runs as what | ||
# you want it to be. Default: autoscan | ||
# autoscan_config: Configuration file for autoscan. | ||
# Default: /usr/local/etc/autoscan.yml | ||
# autoscan_datadir: Directory where autoscan user data lives. | ||
# Default: /var/db/autoscan | ||
# autoscan_log: File to write logrecords to | ||
# Default: /var/log/autoscan.log | ||
|
||
. /etc/rc.subr | ||
|
||
name=autoscan | ||
rcvar=autoscan_enable | ||
|
||
load_rc_config ${name} | ||
|
||
: ${autoscan_enable:=NO} | ||
: ${autoscan_user:=%%USERS%%} | ||
: ${autoscan_group:=%%GROUPS%%} | ||
: ${autoscan_config:="%%PREFIX%%/etc/autoscan.yml"} | ||
: ${autoscan_log:="/var/log/autoscan.log"} | ||
: ${autoscan_datadir:="/var/db/autoscan"} | ||
|
||
pidfile="/var/run/${name}/${name}.pid" | ||
|
||
autoscan_command="%%PREFIX%%/bin/autoscan" | ||
autoscan_args="--config=${autoscan_config} --database=${autoscan_datadir}/autoscan.db --log=${autoscan_log}" | ||
|
||
command="/usr/sbin/daemon" | ||
command_args="-P ${pidfile} -r -f ${autoscan_command} ${autoscan_args}" | ||
start_precmd=autoscan_precmd | ||
|
||
autoscan_precmd() | ||
{ | ||
if [ ! -d "/var/run/${name}" ]; then | ||
install -d -m 0750 -o ${autoscan_user} -g ${autoscan_group} "/var/run/${name}" | ||
fi | ||
|
||
if [ ! -d "${autoscan_datadir}" ]; then | ||
install -d -m 0750 -o ${autoscan_user} -g ${autoscan_group} "${autoscan_datadir}" | ||
fi | ||
|
||
if [ ! -f "${autoscan_log}" ]; then | ||
install -m 644 -o ${autoscan_user} -g ${autoscan_group} /dev/null "${autoscan_log}" | ||
fi | ||
} | ||
|
||
run_rc_command "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Autoscan replaces the default Plex and Emby behaviour | ||
for picking up file changes on the file system. | ||
|
||
Autoscan integrates with Sonarr, Radarr, Lidarr and Google Drive | ||
to fetch changes in near real-time without relying on the file system. |