#!/bin/bash

service apache2 start
service mysql start
service ssh start

export D=/home/bus/popufare/server/daemons

#su bus -c " $D/avls_server/avls_server.pl >> /tmp/avls.log " &
#su bus -c " $D/hello_daemon/hello_daemon.pl >> /tmp/hello.log  " &
#su bus -c " cd $D/billing_server ; $D/billing_server/billing_server.pl >> /tmp/billing_server.log " &
#su bus -c " $D/version_server/version_daemon.pl >> /tmp/version_daemon.log  " &
#su bus -c " $D/buspass_server/buspass_server.pl >> /tmp/buspass_server.log  " &

$D/avls_server/ridelogic_avlsd
$D/billing_server/ridelogic_billingd
$D/buspass_server/ridelogic_buspassd
$D/hello_daemon/ridelogic_hellod
$D/version_server/ridelogic_versiond

while [ true ] ; do
  echo heartbeat
  sleep 5
done
