diff options
author | Vladimir Pavljuchenko (SpiderX) <spiderx@spiderx.dp.ua> | 2016-10-27 12:45:58 +0300 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2016-10-27 23:34:07 +0200 |
commit | 4400c1f56ec027d6a472c25ae6ccd6805291ed35 (patch) | |
tree | ea9288b7536c2da1e3bf4b71a069701ad13fc94e /net-p2p/automatic/files | |
parent | sys-cluster/ceph: Revision bump to 10.2.3-r1 for CVE-2016-8626 (diff) | |
download | gentoo-4400c1f56ec027d6a472c25ae6ccd6805291ed35.tar.gz gentoo-4400c1f56ec027d6a472c25ae6ccd6805291ed35.tar.bz2 gentoo-4400c1f56ec027d6a472c25ae6ccd6805291ed35.zip |
net-p2p/automatic: new ebuild.
Automatic is a RSS daemon that downloads torrent files matching regular
expression patterns at certain intervals. It is capable of adding downloaded
torrents directly to Transmission (www.transmissionbt.com), making it an
auto-downloader.
Base for ebuild from https://github.com/SpiderX/portage-overlay/tree/master/net-p2p/automatic
Gentoo-Bug: https://bugs.gentoo.org/477112
Package-Manager: portage-2.3.0
Closes: https://github.com/gentoo/gentoo/pull/2635
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'net-p2p/automatic/files')
-rw-r--r-- | net-p2p/automatic/files/automatic.confd | 8 | ||||
-rw-r--r-- | net-p2p/automatic/files/automatic.initd | 36 | ||||
-rw-r--r-- | net-p2p/automatic/files/automatic.logrotate | 8 |
3 files changed, 52 insertions, 0 deletions
diff --git a/net-p2p/automatic/files/automatic.confd b/net-p2p/automatic/files/automatic.confd new file mode 100644 index 000000000000..5e9ae5d69625 --- /dev/null +++ b/net-p2p/automatic/files/automatic.confd @@ -0,0 +1,8 @@ +# Config file for /etc/init.d/automatic + +# Various options. +# run `samplicator -h` for valid cmdline options +OPTS="-v 1 -a -l /var/log/automatic/automatic.log" + +# Receiver config file +CONFIG="-c /etc/automatic.conf" diff --git a/net-p2p/automatic/files/automatic.initd b/net-p2p/automatic/files/automatic.initd new file mode 100644 index 000000000000..a5c6189b56b1 --- /dev/null +++ b/net-p2p/automatic/files/automatic.initd @@ -0,0 +1,36 @@ +#!/sbin/openrc-run + +NAME=${SVCNAME##*.} +if [ -n "${NAME}" -a "${SVCNAME}" != "automatic" ]; then + PID="/run/automatic.${NAME}.pid" + PNAME=$(echo ${RC_SVCNAME} | sed 's/\..*//g') + CONF_DEFAULT="/etc/conf.d/automatic.${NAME}" +else + PID="/run/automatic.pid" + PNAME=${RC_SVCNAME} + CONF_DEFAULT="/etc/conf.d/automatic" +fi +CONF=${CONF:-${CONF_DEFAULT}} +EXEC=${EXEC:-/usr/bin/automatic} + +depend() { + need net + provide automatic +} + +start() { + ebegin "Starting automatic" + start-stop-daemon --start --quiet --make-pidfile --pidfile ${PID} --exec ${EXEC} -- ${OPTS} ${CONFIG} + eend $? +} + +start_post() { + pgrep -n $(echo ${PNAME}) > ${PID} +} + +stop() { + ebegin "Stopping automatic" + start-stop-daemon --stop --quiet --pidfile ${PID} + rm -f ${PID} + eend $? +} diff --git a/net-p2p/automatic/files/automatic.logrotate b/net-p2p/automatic/files/automatic.logrotate new file mode 100644 index 000000000000..1af9c5c57cbc --- /dev/null +++ b/net-p2p/automatic/files/automatic.logrotate @@ -0,0 +1,8 @@ +/var/log/automatic/*.log { + daily + missingok + rotate 90 + compress + notifempty + copytruncate +} |