entrypoint.password.sh 532 B

12345678910111213141516
  1. #!/bin/bash
  2. # The net.ipv4.conf.all.src_valid_mark sysctl is set when running the Docker container, so don't have WireGuard also set it
  3. sed -i "s:sysctl -q net.ipv4.conf.all.src_valid_mark=1:echo Skipping setting net.ipv4.conf.all.src_valid_mark:" /usr/bin/wg-quick
  4. /usr/bin/wg-quick up wg0;
  5. sed -ie 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config;
  6. echo '${ROOT_PASSWORD}' | chpasswd
  7. ssh-keygen -A;
  8. /usr/sbin/sshd -D;
  9. # missing docs
  10. trap shutdown SIGTERM SIGINT SIGQUIT
  11. sleep infinity &
  12. wait $!