# Supervisor.
ADD supervisor.conf /etc/supervisor/conf.d/arvados.conf
+ADD ssh.sh /usr/local/bin/ssh.sh
ADD apache2_foreground.sh /etc/apache2/foreground.sh
# Start the supervisor.
read pid cmd state ppid pgrp session tty_nr tpgid rest < /proc/self/stat
trap "kill -TERM -$pgrp; exit" EXIT TERM KILL SIGKILL SIGTERM SIGQUIT
-# Start ssh daemon if requested via the ENABLE_SSH env variable
-if [[ ! "$ENABLE_SSH" =~ (0|false|no|f|^$) ]]; then
- /etc/init.d/ssh start
-fi
-
source /etc/apache2/envvars
/usr/sbin/apache2 -D FOREGROUND
--- /dev/null
+#!/bin/bash
+
+echo $ENABLE_SSH
+
+# Start ssh daemon if requested via the ENABLE_SSH env variable
+if [[ ! "$ENABLE_SSH" =~ (0|false|no|f|^$) ]]; then
+echo "STARTING"
+ /etc/init.d/ssh start
+fi
+
+[program:ssh]
+user=root
+command=/usr/local/bin/ssh.sh
+startsecs=0
+
[program:postgres]
user=postgres
command=/usr/lib/postgresql/9.1/bin/postgres -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf