Files
xteve_lazystream/entrypoint.sh
taylorbourne 62fe13999b init
2020-02-26 13:40:33 -08:00

36 lines
659 B
Bash

#!/bin/bash
crond -l 2
CRONJOB_FILE=/config/cronjob.sh
if [ -f "$CRONJOB_FILE" ]; then
echo "$CRONJOB_FILE exist"
chmod +x $CRONJOB_FILE
chmod 777 $CRONJOB_FILE
else
echo "$CRONJOB_FILE does not exist"
cp /cronjob.sh $CRONJOB_FILE
chmod +x $CRONJOB_FILE
chmod 777 $CRONJOB_FILE
fi
CRON_FILE=/config/cron.txt
if [ -f "$CRON_FILE" ]; then
. $CRON_FILE
else
printf '0 0 * * * /config/cronjob.sh' > /etc/crontabs/root
cp /sample_cron.txt /config/sample_cron.txt
fi
XTEVE_FILE=/config/xteve.txt
if [ -f "$XTEVE_FILE" ]; then
. $XTEVE_FILE
else
cp /sample_xteve.txt /config/sample_xteve.txt
xteve -port=34400 -config=/root/.xteve/
fi
exit