Browse Source

Blindly restore sanity

trusty
Dave Pedu 4 years ago
parent
commit
0e2a201da1
5 changed files with 11 additions and 29 deletions
  1. +5
    -10
      Dockerfile
  2. +3
    -2
      deluged.conf
  3. +0
    -5
      run_deluge.sh
  4. +0
    -10
      start
  5. +3
    -2
      vnstatd.conf

+ 5
- 10
Dockerfile View File

@@ -11,24 +11,20 @@ COPY auth /home/deluge/.config/deluge/
COPY core.conf /home/deluge/.config/deluge/
COPY web_plugin.conf /home/deluge/.config/deluge/
COPY web.conf /home/deluge/.config/
COPY run_deluge.sh /
RUN apt-get update ; \
apt-get install -y software-properties-common ; \
add-apt-repository -y ppa:deluge-team/ppa ; \
apt-get update ; \
apt-get -y install deluged deluge-web deluge-console ; \
chown -R deluge /home/deluge/.config ; \
chgrp -R deluge /home/deluge/.config ; \
chmod +x /run_deluge.sh
chgrp -R deluge /home/deluge/.config

# Install supervisor, vnstat, & start script
RUN apt-get -y install supervisor vnstat ; mkdir /start.d
# Install supervisor, vnstat
RUN apt-get -y install supervisor vnstat
COPY deluged.conf /etc/supervisor/conf.d/deluged.conf
COPY vnstatd.conf etc/supervisor/conf.d/vnstatd.conf
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY start /start
RUN chmod +x /start ; \
chown -R deluge /var/lib/vnstat ; \
RUN chown -R deluge /var/lib/vnstat ; \
chgrp -R deluge /var/lib/vnstat ; \
sed -i -e"s/^UnitMode\s0/UnitMode 1/" /etc/vnstat.conf ; \
sed -i -e"s/^RateUnit\s1/RateUnit 0/" /etc/vnstat.conf
@@ -45,5 +41,4 @@ EXPOSE 58846
# REMEMBER TO MANUALLY SPECIFY A PEER PORT ON RUN

# Set boot command
CMD /start

ENTRYPOINT ["supervisord"]

+ 3
- 2
deluged.conf View File

@@ -1,4 +1,5 @@
[program:deluged]
autorestart=true
command=/run_deluge.sh

command=/usr/bin/deluged --do-not-daemonize
user=deluge
environment=HOME="/home/deluge",USER="deluge"

+ 0
- 5
run_deluge.sh View File

@@ -1,5 +0,0 @@
#!/bin/bash

cd /home/deluge/
su -c "/usr/bin/deluged --do-not-daemonize" deluge


+ 0
- 10
start View File

@@ -1,10 +0,0 @@
#!/bin/bash

# run everything in start.d
find /start.d -type f -executable -exec {} \;

# Cleanly kill supervisor when container is stopped
trap 'kill $(jobs -p)' EXIT

# start services
supervisord

+ 3
- 2
vnstatd.conf View File

@@ -1,4 +1,5 @@
[program:vnstatd]
command=/bin/su -c '/usr/sbin/vnstatd -n' deluge
command=/usr/sbin/vnstatd --nodaemon
autorestart=true

user=deluge
environment=HOME="/home/deluge",USER="deluge"

Loading…
Cancel
Save