mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-26 08:51:06 +00:00
685af77007
* 404 when no directory * fix go-supervisor.conf location * Use /var/run/resin for gosuper socket * Remove potential spurious gosuper binaries
32 lines
670 B
Bash
Executable File
32 lines
670 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
[ -d /dev/net ] ||
|
|
mkdir -p /dev/net
|
|
[ -c /dev/net/tun ] ||
|
|
mknod /dev/net/tun c 10 200
|
|
|
|
cd /app
|
|
|
|
DATA_DIRECTORY=/data
|
|
if [ -d "$DATA_DIRECTORY" ]; then
|
|
cp bin/enter.sh $DATA_DIRECTORY/enter.sh
|
|
chmod +x $DATA_DIRECTORY/enter.sh
|
|
fi
|
|
|
|
mkdir -p /var/log/supervisor && touch /var/log/supervisor/supervisord.log
|
|
mkdir -p /var/run/resin
|
|
mount -t tmpfs -o size=1m tmpfs /var/run/resin
|
|
|
|
if [ -z "$GOSUPER_SOCKET" ]; then
|
|
export GOSUPER_SOCKET=/var/run/resin/gosuper.sock
|
|
fi
|
|
|
|
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
|
|
|
supervisorctl start resin-supervisor
|
|
supervisorctl start go-supervisor
|
|
|
|
tail -f /var/log/supervisor/supervisord.log
|