antosaio/start.sh

16 lines
518 B
Bash
Raw Normal View History

2021-03-24 20:27:43 +01:00
#! /bin/sh
2021-03-26 14:41:34 +01:00
mkdir -p /app/data
2021-03-26 14:03:33 +01:00
if [ -f "/app/file.fs" ]; then
2021-03-26 14:41:34 +01:00
mount /app/file.fs /app/data
2021-03-26 14:03:33 +01:00
fi
2021-03-26 14:41:34 +01:00
mkdir -p /app/data/home
mkdir -p /app/data/database
mkdir -p /app/data/tmp
[ ! -e "/home/$ANTOS_USER" ] && ln -sf /app/data/home "/home/$ANTOS_USER"
2021-03-24 20:27:43 +01:00
adduser --home "/home/$ANTOS_USER" --disabled-password --gecos "" "$ANTOS_USER"
2021-03-27 16:32:30 +01:00
echo "$ANTOS_USER:$ANTOS_PASSWORD" | /bin/chpasswd
2021-03-24 20:27:43 +01:00
# start antd-tunnel service
2021-03-24 22:12:50 +01:00
/usr/bin/antd /app/antd-config.ini &
sleep 1
2021-03-24 20:27:43 +01:00
[ -f /app/runner.ini ] && /opt/www/bin/runner /app/runner.ini &
2021-03-24 22:12:50 +01:00
wait