wip: migrate to mono-repo. SPN has already been moved to spn/

This commit is contained in:
Patrick Pacher
2024-03-15 11:55:13 +01:00
parent b30fd00ccf
commit 8579430db9
577 changed files with 35981 additions and 818 deletions

30
spn/tools/container-init.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/sh
DATA="/data"
START="/data/portmaster-start"
INIT_START="/init/portmaster-start"
# Set safe shell options.
set -euf -o pipefail
# Check if data dir is mounted.
if [ ! -d $DATA ]; then
echo "Nothing mounted at $DATA, aborting."
exit 1
fi
# Copy init start to correct location, if not available.
if [ ! -f $START ]; then
cp $INIT_START $START
fi
# Download updates.
echo "running: $START update --data /data --intel-only"
$START update --data /data --intel-only
# Remove PID file, which could have been left after a crash.
rm -f $DATA/hub-lock.pid
# Always start the SPN Hub with the updated main start binary.
echo "running: $START hub --data /data -- $@"
$START hub --data /data -- $@