aboutsummaryrefslogtreecommitdiffstats
path: root/service/entrypoint.sh
blob: d68257ec52b254784249cf7f966e753e9dbbc2d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

mkdir -p "$RESULTDIR"
chown -R service:service "$RESULTDIR"

expiry=$((13*60))
while [ 1 ]; do
	reftime="$(($(date +%s)-$expiry))"
	echo "[FILE CLEANUP] @ $(date +%T)"
	cleaner "$RESULTDIR" "$reftime" &> /tmp/cleaner-log
	sleep 70
done &

CMD="ncat -k -l -p 9090 -m 200 --no-shutdown -w10s -i180s -e /service/build/stldoctor"
su -s /bin/sh -c "$CMD" service