diff --git a/piframefleet/Dockerfile b/piframefleet/Dockerfile index 3c5a17d..3a5395e 100644 --- a/piframefleet/Dockerfile +++ b/piframefleet/Dockerfile @@ -23,7 +23,7 @@ RUN apt update && apt upgrade -y && \ tar xzf /opt/s6-overlay.tar.gz -C / --exclude="./bin" && \ tar xzf /opt/s6-overlay.tar.gz -C /usr ./bin && \ echo "**** wireguard ****" && \ - apt install -y build-essential ifupdown iproute2 iptables iputils-ping libc6 libelf-dev pkg-config && \ + apt install -y build-essential ifupdown net-tools iproute2 iptables iputils-ping libc6 libelf-dev pkg-config && \ WIREGUARD_RELEASE=$(curl -sX GET "https://api.github.com/repos/WireGuard/wireguard-tools/tags" \ | jq -r .[0].name); \ git clone https://git.zx2c4.com/wireguard-tools /opt/wireguard-tools && \ diff --git a/piframefleet/root/etc/cont-init.d/30-config b/piframefleet/root/etc/cont-init.d/30-config index b866d97..7385a4f 100755 --- a/piframefleet/root/etc/cont-init.d/30-config +++ b/piframefleet/root/etc/cont-init.d/30-config @@ -14,12 +14,23 @@ if [ ! -d "/opt/ansible" ] ; then mkdir /opt/ansible fi if [ ! -f "/opt/ansible/ssh.key" ] ; then - ssh-keygen -t rsa -b 4096 -f /opt/ansible/ssh.key -N '""' + ssh-keygen -t rsa -b 4096 -f /opt/ansible/ssh.key -N '' + echo " +------------------------------------- +Ansible SSH Key" +cat /opt/ansible/ssh.key.pub +echo "------------------------------------- +" fi if [ ! -d "/opt/ansible/roles" ] ; then mkdir /opt/ansible/roles fi -git clone https://git.kemonine.info/PiFrame/ansible-role-wireguard.git /opt/ansible/roles/wireguard +if [ ! -d "/opt/ansible/roles/wireguard" ] ; then + git clone https://git.kemonine.info/PiFrame/ansible-role-wireguard.git /opt/ansible/roles/wireguard +else + cd /opt/ansible/roles/wireguard + git pull +fi #################### # WireGuard diff --git a/piframefleet_run.sh b/piframefleet_run.sh index a690f1a..7d9037f 100755 --- a/piframefleet_run.sh +++ b/piframefleet_run.sh @@ -13,10 +13,10 @@ sudo docker run -it \ --cap-add=NET_ADMIN \ --cap-add=SYS_MODULE \ -e TZ=UTC \ - -e ENABLE_WIREGUARD=false \ + -e ENABLE_WIREGUARD=true \ -e ENABLE_SYNCTHING=true \ -e ENABLE_FILEBROWSER=true \ - -p 51821:51820/udp \ + -p 51821:51821/udp \ -p 8384:8384/tcp \ -p 22000:22000/tcp \ -p 9191:9191/tcp \