From 860ff9cd0d916e3ee98ec7bbc1a9b387a73ae3fb Mon Sep 17 00:00:00 2001 From: dave Date: Fri, 20 Mar 2015 20:24:23 -0700 Subject: [PATCH] Remove ssh, general improvements --- Dockerfile | 8 +++++--- deluged.conf | 4 ++++ start | 7 ++++++- supervisord.conf | 16 ---------------- vnstatd.conf | 4 ++++ 5 files changed, 19 insertions(+), 20 deletions(-) create mode 100644 deluged.conf mode change 100644 => 100755 start create mode 100644 vnstatd.conf diff --git a/Dockerfile b/Dockerfile index f671bf9..2c40c5f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,11 +19,13 @@ RUN apt-get update ; \ chmod +x /run_deluge.sh # Install SSH server -RUN mkdir /var/run/sshd ; \ - apt-get -y install openssh-server +#RUN mkdir /var/run/sshd ; \ +# apt-get -y install openssh-server # Install supervisor, vnstat, & start script -RUN apt-get -y install supervisor vnstat +RUN apt-get -y install supervisor vnstat ; mkdir /start.d +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 ; \ diff --git a/deluged.conf b/deluged.conf new file mode 100644 index 0000000..7d845f6 --- /dev/null +++ b/deluged.conf @@ -0,0 +1,4 @@ +[program:deluged] +autorestart=true +command=/run_deluge.sh + diff --git a/start b/start old mode 100644 new mode 100755 index b8ff4e6..465c607 --- a/start +++ b/start @@ -1,5 +1,10 @@ #!/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 - diff --git a/supervisord.conf b/supervisord.conf index 7cf6e4e..3fb016d 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -1,19 +1,3 @@ [supervisord] nodaemon=true -[program:sshd] -command=/usr/sbin/sshd -D -autorestart=true - -[program:deluged] -autorestart=true -command=/run_deluge.sh - -[program:cron] -command=/usr/sbin/cron -f -autorestart=true - -[program:vnstatd] -command=/bin/su -c '/usr/sbin/vnstatd -n' deluge -autorestart=true - diff --git a/vnstatd.conf b/vnstatd.conf new file mode 100644 index 0000000..7df1f6c --- /dev/null +++ b/vnstatd.conf @@ -0,0 +1,4 @@ +[program:vnstatd] +command=/bin/su -c '/usr/sbin/vnstatd -n' deluge +autorestart=true +