mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-04-20 04:19:18 +00:00
Add RTORRENT_SCGI variable for use scgi port (#158)
* Feature(rtorrent-flood) : Add RTORRENT_SCGI variable for use scgi port * Fix rtorrent-flood
This commit is contained in:
parent
3b8e2be84c
commit
74befe2cc4
@ -9,6 +9,7 @@ ARG BUILD_CORES
|
|||||||
ENV UID=991 GID=991 \
|
ENV UID=991 GID=991 \
|
||||||
FLOOD_SECRET=supersecret \
|
FLOOD_SECRET=supersecret \
|
||||||
CONTEXT_PATH=/ \
|
CONTEXT_PATH=/ \
|
||||||
|
RTORRENT_SCGI=0 \
|
||||||
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
||||||
|
|
||||||
RUN NB_CORES=${BUILD_CORES-`getconf _NPROCESSORS_CONF`} \
|
RUN NB_CORES=${BUILD_CORES-`getconf _NPROCESSORS_CONF`} \
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
- **GID** : group id (defaut : 991)
|
- **GID** : group id (defaut : 991)
|
||||||
- **FLOOD_SECRET** : flood secret key (defaut : mysupersecretkey) (CHANGE IT)
|
- **FLOOD_SECRET** : flood secret key (defaut : mysupersecretkey) (CHANGE IT)
|
||||||
- **CONTEXT_PATH** : context path (base_URI) (default : /)
|
- **CONTEXT_PATH** : context path (base_URI) (default : /)
|
||||||
|
- **RTORRENT_SCGI** : SCGI port (default : 0 for use local socket)
|
||||||
- **PKG_CONFIG_PATH** : `/usr/local/lib/pkgconfig` (don't touch)
|
- **PKG_CONFIG_PATH** : `/usr/local/lib/pkgconfig` (don't touch)
|
||||||
|
|
||||||
#### Ports
|
#### Ports
|
||||||
|
@ -15,4 +15,9 @@ rm -f /data/.session/rtorrent.lock
|
|||||||
mv /usr/flood /usr/fix && mv /usr/fix /usr/flood # fix strange bug
|
mv /usr/flood /usr/fix && mv /usr/fix /usr/flood # fix strange bug
|
||||||
chown -R $UID:$GID /data /home/torrent /tmp /filebot /usr/flood /flood-db /etc/s6.d
|
chown -R $UID:$GID /data /home/torrent /tmp /filebot /usr/flood /flood-db /etc/s6.d
|
||||||
|
|
||||||
|
if [ ${RTORRENT_SCGI} -ne 0 ]; then
|
||||||
|
sed -i -e 's|^scgi_local.*$|scgi_port = 0.0.0.0:'${RTORRENT_SCGI}'|' /home/torrent/.rtorrent.rc
|
||||||
|
sed -i -e 's|socket: true,|socket: false,|' -e 's|port: 5000,|port: '${RTORRENT_SCGI}',|' /usr/flood/config.js
|
||||||
|
fi
|
||||||
|
|
||||||
exec su-exec $GID:$UID /bin/s6-svscan /etc/s6.d
|
exec su-exec $GID:$UID /bin/s6-svscan /etc/s6.d
|
||||||
|
Loading…
x
Reference in New Issue
Block a user