frp build
authorMichael Wagner <michael@wagnertech.de>
Tue, 13 Aug 2024 13:04:34 +0000 (15:04 +0200)
committerMichael Wagner <michael@wagnertech.de>
Tue, 13 Aug 2024 13:04:34 +0000 (15:04 +0200)
debian/frpc.conf [new file with mode: 0644]
debian/frpc.control [new file with mode: 0644]
debian/frpc.cp [new file with mode: 0755]
debian/frpc.prepare [new file with mode: 0755]
debian/frps.conf [new file with mode: 0644]
debian/frps.control [new file with mode: 0644]
debian/frps.cp [new file with mode: 0755]
debian/frps.prepare [new file with mode: 0755]
frp/.dummy [new file with mode: 0644]
frp/frpc.service [new file with mode: 0644]
frp/frps.service [new file with mode: 0644]

diff --git a/debian/frpc.conf b/debian/frpc.conf
new file mode 100644 (file)
index 0000000..53a0a5c
--- /dev/null
@@ -0,0 +1,17 @@
+# Aufruf:
+# mconfigure -v 0.51.0 frpc
+
+compile_type=NONE
+target_type=DEB
+multibuild=2
+
+echo "run= $run"
+if [ $run -eq 1 ]; then
+       export ARCH=amd64
+elif [ $run -eq 2 ]; then
+       export ARCH=arm
+else
+       echo "unknown run number"
+       exit 2
+fi
+
diff --git a/debian/frpc.control b/debian/frpc.control
new file mode 100644 (file)
index 0000000..a0dc972
--- /dev/null
@@ -0,0 +1,10 @@
+Source: frpc
+Section: main
+Priority: optional
+Maintainer: Michael Wagner <michael@wagnertech.de>
+Build-Depends: git
+Package: frpc
+Architecture: _DEB_HOST_ARCH
+Description: frp server. see http://github.com/fatedier/frp
+
diff --git a/debian/frpc.cp b/debian/frpc.cp
new file mode 100755 (executable)
index 0000000..ed34367
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+set -e
+
+mkdir -p $1/usr/bin
+cp Downloads/frp_${version}_linux_$DEB_HOST_ARCH/frpc $1/usr/bin/
+
+mkdir -p $1/etc
+cp Downloads/frp_${version}_linux_$DEB_HOST_ARCH/frpc.toml $1/etc/
+
+mkdir -p $1/lib/systemd/system
+cp frp/frpc.service $1/lib/systemd/system/
+
diff --git a/debian/frpc.prepare b/debian/frpc.prepare
new file mode 100755 (executable)
index 0000000..35088d2
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+set -e
+
+mkdir -p Downloads
+cd Downloads
+
+if ! [ -d frp_${version}_linux_$DEB_HOST_ARCH ]
+then
+       rm *tar.gz*
+       wget https://github.com/fatedier/frp/releases/download/v$version/frp_${version}_linux_$DEB_HOST_ARCH.tar.gz
+       tar xf frp_${version}_linux_$DEB_HOST_ARCH.tar.gz
+fi
+
diff --git a/debian/frps.conf b/debian/frps.conf
new file mode 100644 (file)
index 0000000..caf1640
--- /dev/null
@@ -0,0 +1,17 @@
+# Aufruf:
+# mconfigure -v 0.51.0 frps
+
+compile_type=NONE
+target_type=DEB
+multibuild=2
+
+echo "run= $run"
+if [ $run -eq 1 ]; then
+       export ARCH=amd64
+elif [ $run -eq 2 ]; then
+       export ARCH=arm
+else
+       echo "unknown run number"
+       exit 2
+fi
+
diff --git a/debian/frps.control b/debian/frps.control
new file mode 100644 (file)
index 0000000..8a493b9
--- /dev/null
@@ -0,0 +1,10 @@
+Source: frps
+Section: main
+Priority: optional
+Maintainer: Michael Wagner <michael@wagnertech.de>
+Build-Depends: git
+Package: frps
+Architecture: _DEB_HOST_ARCH
+Description: frp server. see http://github.com/fatedier/frp
+
diff --git a/debian/frps.cp b/debian/frps.cp
new file mode 100755 (executable)
index 0000000..285e32d
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+set -e
+
+mkdir -p $1/usr/bin
+cp Downloads/frp_${version}_linux_$DEB_HOST_ARCH/frps $1/usr/bin/
+
+mkdir -p $1/etc
+cp Downloads/frp_${version}_linux_$DEB_HOST_ARCH/frps.toml $1/etc
+
+mkdir -p $1/lib/systemd/system
+cp frp/frps.service $1/lib/systemd/system/
+
diff --git a/debian/frps.prepare b/debian/frps.prepare
new file mode 100755 (executable)
index 0000000..35088d2
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+set -e
+
+mkdir -p Downloads
+cd Downloads
+
+if ! [ -d frp_${version}_linux_$DEB_HOST_ARCH ]
+then
+       rm *tar.gz*
+       wget https://github.com/fatedier/frp/releases/download/v$version/frp_${version}_linux_$DEB_HOST_ARCH.tar.gz
+       tar xf frp_${version}_linux_$DEB_HOST_ARCH.tar.gz
+fi
+
diff --git a/frp/.dummy b/frp/.dummy
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/frp/frpc.service b/frp/frpc.service
new file mode 100644 (file)
index 0000000..aefa603
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=FRPS fast reverse proxy server
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/frpc -c /etc/frpc.toml
+KillMode=process
+Restart=on-failure
+Type=simple
+
+[Install]
+WantedBy=multi-user.target
+Alias=frps.service
+
diff --git a/frp/frps.service b/frp/frps.service
new file mode 100644 (file)
index 0000000..36be06c
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=FRPS fast reverse proxy server
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/frps -c /etc/frps.toml
+KillMode=process
+Restart=on-failure
+Type=simple
+
+[Install]
+WantedBy=multi-user.target
+Alias=frps.service
+