From 0facfe068676c9d0f6324e9f6d1ccb69d9697d13 Mon Sep 17 00:00:00 2001 From: Niklas Yann Wettengel Date: Wed, 30 Oct 2024 15:04:58 +0100 Subject: rm fastd stuff --- roles/install_fastd/files/fastd_grep.sh | 7 --- roles/install_fastd/files/verify.sh | 6 --- roles/install_fastd/handlers/main.yml | 40 ----------------- roles/install_fastd/tasks/main.yml | 61 -------------------------- roles/install_fastd/templates/fastd-api.php.j2 | 45 ------------------- roles/install_fastd/templates/fastd.conf.j2 | 13 ------ roles/install_fastd/templates/fastd_up.sh.j2 | 11 ----- 7 files changed, 183 deletions(-) delete mode 100644 roles/install_fastd/files/fastd_grep.sh delete mode 100644 roles/install_fastd/files/verify.sh delete mode 100644 roles/install_fastd/handlers/main.yml delete mode 100644 roles/install_fastd/tasks/main.yml delete mode 100644 roles/install_fastd/templates/fastd-api.php.j2 delete mode 100644 roles/install_fastd/templates/fastd.conf.j2 delete mode 100644 roles/install_fastd/templates/fastd_up.sh.j2 (limited to 'roles/install_fastd') diff --git a/roles/install_fastd/files/fastd_grep.sh b/roles/install_fastd/files/fastd_grep.sh deleted file mode 100644 index 37f5118..0000000 --- a/roles/install_fastd/files/fastd_grep.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -for file in /run/ff*.socket -do - echo $file - nc -U $file | jq -r '.peers | keys[] as $k | "\(.[$k] | .connection.mac_addresses[]) \(.[$k] | .address) \($k)"' | grep $1 -done diff --git a/roles/install_fastd/files/verify.sh b/roles/install_fastd/files/verify.sh deleted file mode 100644 index 77cf5f4..0000000 --- a/roles/install_fastd/files/verify.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -if grep -q $PEER_KEY /etc/fastd_blacklist; then - echo $PEER_KEY blacklisted - exit 1 -fi -exit 0 diff --git a/roles/install_fastd/handlers/main.yml b/roles/install_fastd/handlers/main.yml deleted file mode 100644 index 68b2174..0000000 --- a/roles/install_fastd/handlers/main.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -- name: reload fastd - systemd: - name: fastd@ffmyk.service - state: reloaded - -- name: restart fastdaw - systemd: - name: fastd@ffaw.service - state: restarted - -- name: restart fastdcoc - systemd: - name: fastd@ffcoc.service - state: restarted - -- name: restart fastdems - systemd: - name: fastd@ffems.service - state: restarted - -- name: restart fastdko - systemd: - name: fastd@ffko.service - state: restarted - -- name: restart fastdmy - systemd: - name: fastd@ffmy.service - state: restarted - -- name: restart fastdsim - systemd: - name: fastd@ffsim.service - state: restarted - -- name: restart fastdww - systemd: - name: fastd@ffww.service - state: restarted diff --git a/roles/install_fastd/tasks/main.yml b/roles/install_fastd/tasks/main.yml deleted file mode 100644 index 85d6aa2..0000000 --- a/roles/install_fastd/tasks/main.yml +++ /dev/null @@ -1,61 +0,0 @@ ---- -- name: install fastd - pacman: - name: fastd - state: present - -- name: create site folder - file: - path: /etc/fastd/ff{{ item.name }} - state: directory - with_items: "{{ sites }}" - -- name: fastd.conf - template: - src: fastd.conf.j2 - dest: /etc/fastd/ff{{ item.name }}/fastd.conf - mode: 0640 - notify: restart fastd{{ item.name }} - with_items: "{{ sites }}" - -- name: add fastd bin folder - file: - path: /etc/fastd/ff{{ item.name }}/bin - state: directory - with_items: "{{ sites }}" - -- name: add fastd up script - template: - src: fastd_up.sh.j2 - dest: /etc/fastd/ff{{ item.name }}/bin/up.sh - mode: 0744 - notify: restart fastd{{ item.name }} - with_items: "{{ sites }}" - -- name: add fastd verify script - copy: - src: verify.sh - dest: /etc/fastd/ff{{ item.name }}/bin/verify.sh - mode: 0744 - with_items: "{{ sites }}" - -- name: add fastd_grep script - copy: - src: fastd_grep.sh - dest: /root/fastd_grep.sh - mode: 0744 - -- name: install fastd_grep dependencies - pacman: - name: - - openbsd-netcat - - jq - state: present - - -- name: start and enable fastd service - systemd: - name: fastd@ff{{ item.name }}.service - enabled: yes - state: started - with_items: "{{ sites }}" diff --git a/roles/install_fastd/templates/fastd-api.php.j2 b/roles/install_fastd/templates/fastd-api.php.j2 deleted file mode 100644 index 7b1fc17..0000000 --- a/roles/install_fastd/templates/fastd-api.php.j2 +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/php -f - diff --git a/roles/install_fastd/templates/fastd.conf.j2 b/roles/install_fastd/templates/fastd.conf.j2 deleted file mode 100644 index 417d8e8..0000000 --- a/roles/install_fastd/templates/fastd.conf.j2 +++ /dev/null @@ -1,13 +0,0 @@ -log to syslog level info; -interface "vpn{{ item.name }}"; -method "salsa2012+gmac"; -method "salsa2012+umac"; -secure handshakes yes; -bind any:{{ item.fastd_port1 }}; -hide ip addresses yes; -hide mac addresses yes; -mtu 1280; -secret "{{ item.fastd_secret }}"; -on up "/etc/fastd/ff{{ item.name }}/bin/up.sh $INTERFACE"; -status socket "/run/ff{{ item.name }}1.socket"; -on verify "/etc/fastd/ff{{ item.name }}/bin/verify.sh"; diff --git a/roles/install_fastd/templates/fastd_up.sh.j2 b/roles/install_fastd/templates/fastd_up.sh.j2 deleted file mode 100644 index 872e681..0000000 --- a/roles/install_fastd/templates/fastd_up.sh.j2 +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -ip link set address {{ item.fastd_mesh_mac }} dev $1 -ip link set up dev $1 -batctl meshif bat{{ item.name }} if add $1 -batctl meshif bat{{ item.name }} gw server 1000000/1000000 -batctl meshif bat{{ item.name }} it 10000 -batctl meshif bat{{ item.name }} mm 1 -batctl meshif bat{{ item.name }} hop_penalty 64 -netctl start bat{{ item.name }} -systemctl restart dhcpd4.service -systemctl restart named.service -- cgit v1.2.3-54-g00ecf