net-vpn/frp: add 0.53.2-r1, drop 0.53.2
This commit is contained in:
parent
9b234895a6
commit
302eef7450
@ -8,8 +8,8 @@ Type=simple
|
|||||||
User=nobody
|
User=nobody
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
ExecStart=/usr/bin/frpc -c /etc/frp/frpc.ini
|
ExecStart=/usr/bin/frpc -c /etc/frp/frpc.toml
|
||||||
ExecReload=/usr/bin/frpc reload -c /etc/frp/frpc.ini
|
ExecReload=/usr/bin/frpc reload -c /etc/frp/frpc.toml
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -8,8 +8,8 @@ Type=simple
|
|||||||
User=nobody
|
User=nobody
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
ExecStart=/usr/bin/frpc -c /etc/frp/%i.ini
|
ExecStart=/usr/bin/frpc -c /etc/frp/%i.toml
|
||||||
ExecReload=/usr/bin/frpc reload -c /etc/frp/%i.ini
|
ExecReload=/usr/bin/frpc reload -c /etc/frp/%i.toml
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -8,7 +8,7 @@ Type=simple
|
|||||||
User=nobody
|
User=nobody
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
ExecStart=/usr/bin/frps -c /etc/frp/frps.ini
|
ExecStart=/usr/bin/frps -c /etc/frp/frps.toml
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -8,7 +8,7 @@ Type=simple
|
|||||||
User=nobody
|
User=nobody
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
ExecStart=/usr/bin/frps -c /etc/frp/%i.ini
|
ExecStart=/usr/bin/frps -c /etc/frp/%i.toml
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -21,45 +21,48 @@ RDEPEND=""
|
|||||||
BDEPEND="dev-lang/go"
|
BDEPEND="dev-lang/go"
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
mkdir -pv completions || die
|
mkdir -pv comp || die
|
||||||
|
|
||||||
if use client; then
|
if use client; then
|
||||||
ego build -trimpath -ldflags "-w" -o frpc ./cmd/frpc
|
ego build -trimpath -ldflags "-w" -o frpc ./cmd/frpc
|
||||||
./frpc completion bash > completions/frpc || die
|
./frpc completion bash > comp/frpc || die
|
||||||
./frpc completion fish > completions/frpc.fish || die
|
./frpc completion fish > comp/frpc.fish || die
|
||||||
./frpc completion zsh > completions/_frpc || die
|
./frpc completion zsh > comp/_frpc || die
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if use server; then
|
if use server; then
|
||||||
ego build -trimpath -ldflags "-w" -o frps ./cmd/frps
|
ego build -trimpath -ldflags "-w" -o frps ./cmd/frps
|
||||||
./frps completion bash > completions/frps || die
|
./frps completion bash > comp/frps || die
|
||||||
./frps completion fish > completions/frps.fish || die
|
./frps completion fish > comp/frps.fish || die
|
||||||
./frps completion zsh > completions/_frps || die
|
./frps completion zsh > comp/_frps || die
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
if use client; then
|
_install() {
|
||||||
dobin frpc
|
# Install binary file
|
||||||
dobashcomp completions/frpc
|
dobin "${1}"
|
||||||
systemd_dounit "${FILESDIR}/frpc.service"
|
|
||||||
systemd_newunit "${FILESDIR}/frpc_at.service" frpc@.service
|
|
||||||
|
|
||||||
for x in conf/frpc*.toml; do mv "${x}"{,.example}; done
|
# Install completion files
|
||||||
|
dobashcomp "${S}/comp/${1}"
|
||||||
|
dofishcomp "${S}/comp/${1}.fish"
|
||||||
|
dozshcomp "${S}/comp/_${1}"
|
||||||
|
|
||||||
|
# Install systemd services
|
||||||
|
systemd_dounit "${FILESDIR}/${1}.service"
|
||||||
|
systemd_newunit "${FILESDIR}/${1}_at.service" "${1}@.service"
|
||||||
|
|
||||||
|
# Install config files
|
||||||
|
insinto "/etc/${PN}"
|
||||||
|
newins "${S}/conf/${1}.toml" "${1}.toml.example"
|
||||||
|
newins "${S}/conf/${1}_full_example.toml" "${1}_full.toml.example"
|
||||||
|
}
|
||||||
|
|
||||||
|
if use client; then
|
||||||
|
_install frpc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if use server; then
|
if use server; then
|
||||||
dobin frps
|
_install frps
|
||||||
dobashcomp completions/frps
|
|
||||||
systemd_dounit "${FILESDIR}/frps.service"
|
|
||||||
systemd_newunit "${FILESDIR}/frps_at.service" frps@.service
|
|
||||||
|
|
||||||
for x in conf/frps*.toml; do mv "${x}"{,.example}; done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
insinto /etc/frp
|
|
||||||
doins conf/*.example
|
|
||||||
|
|
||||||
dofishcomp completions/*.fish
|
|
||||||
dozshcomp completions/_*
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user