antosaio/start.sh

22 lines
753 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
2021-10-24 20:26:18 +02:00
ln -sf /app/data/tmp /opt/www/tmp
2022-08-21 14:49:17 +02:00
if [ ! -z "$ANTOS_USER" ]; then
[ ! -e "/home/$ANTOS_USER" ] && ln -sf /app/data/home "/home/$ANTOS_USER"
adduser --home "/home/$ANTOS_USER" --disabled-password --gecos "" "$ANTOS_USER"
echo "$ANTOS_USER:$ANTOS_PASSWORD" | /bin/chpasswd
fi
2021-03-24 20:27:43 +01:00
# start antd-tunnel service
2022-08-18 11:08:24 +02:00
[ ! -f "/app/antd-config.ini" ] && cp /opt/www/antd-config.ini /app/antd-config.ini
[ ! -f "/app/runner.ini" ] && cp /opt/www/runner.ini /app/runner.ini
2021-03-24 22:12:50 +01:00
/usr/bin/antd /app/antd-config.ini &
2022-08-18 11:08:24 +02:00
sleep 2
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