#!/bin/sh
set -e

# Läs secrets
PW=$(cat /run/secrets/skoda_password)
SPIN=$(cat /run/secrets/skoda_spin)

cat > /root/.netrc <<EOF
machine skoda
  login simon@milvert.com
  password $PW
  account $SPIN
EOF

chmod 600 /root/.netrc

# Kör original-cmd
exec "$@"