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
|
2022-08-22 12:18:20 +02:00
|
|
|
|
|
|
|
unset ANTOS_USER
|
|
|
|
unset ANTOS_PASSWORD
|
|
|
|
|
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
|
|
|
|
|
2022-10-05 21:21:02 +02:00
|
|
|
# start syslog
|
|
|
|
syslogd -O /tmp/messages
|
|
|
|
|
|
|
|
usr/bin/antd /app/antd-config.ini >/dev/null 2>&1 | \
|
2022-09-19 18:51:44 +02:00
|
|
|
( sleep 2 && /opt/www/bin/runner /app/runner.ini >/dev/null 2>&1 &)
|
2022-10-05 21:21:02 +02:00
|
|
|
# /bin/sh
|