Update 99-run.sh

This commit is contained in:
Alexandre
2025-02-10 22:49:07 +01:00
committed by GitHub
parent 8fbd517a43
commit 315d626bf2

View File

@@ -6,20 +6,20 @@ set -e
# Set configuration directory
mkdir -p /config/.signalk
if [ -d "/home/node/.signalk" ]; then
if [ "$(ls -A /home/node/.signalk)" ]; then
if [ -n "$(find /home/node/.signalk -mindepth 1 -print -quit 2>/dev/null)" ]; then
cp -r /home/node/.signalk/* /config/.signalk/
fi
rm -r "/home/node/.signalk"
rm -rf "/home/node/.signalk"
fi
ln -sf /config/.signalk "/home/node/.signalk"
# Set single user for ssl files
# Set single user for SSL files
for file in ssl-key.pem ssl-cert.pem; do
if [ -e /config/.signalk/"$file" ]; then
chown "$(id -u):$(id -g)" /config/.signalk/"$file"
chmod 600 /config/.signalk/"$file"
if [ -e "/config/.signalk/$file" ]; then
chown "$(id -u):$(id -g)" "/config/.signalk/$file"
chmod 600 "/config/.signalk/$file"
fi
done
bashio::log.info "Starting application"
/./home/node/signalk/startup.sh
exec /home/node/signalk/startup.sh