This commit is contained in:
serxoz 2024-10-09 10:35:08 +02:00
parent f4fcb2db40
commit b47a51f598
2 changed files with 20 additions and 2 deletions

17
Makefile Normal file
View File

@ -0,0 +1,17 @@
NAME = share
VERSION = 0.0.2
all:
cargo build
static:
CARGO_BUILD_TARGET=x86_64-unknown-linux-musl cargo build --release
check-static:
ldd target/x86_64-unknown-linux-musl/release/share
release:
cargo build --release
clean:
sudo rm -rf target

View File

@ -1,6 +1,6 @@
#!/bin/ksh
#
# $OpenBSD: sh4rin.rc,v 0.0.1 2022/10/25
# $OpenBSD: sh4rin.rc,v 0.0.2 2023/04/24
daemon="/usr/local/bin/share"
daemon_user="_sh4rin"
@ -9,9 +9,10 @@ env="UPLOADS=/home/_sh4rin/uploads/ PORT=3000 BASE_URL=https://sh4r.in RPROXY=tr
. /etc/rc.d/rc.subr
rc_usercheck=NO
rc_bg=YES
rc_start() {
${rcexec} "${env} ${daemon} 2>&1 | logger -t sh4rin &"
rc_exec "${env} ${daemon} 2>&1 | logger -t sh4rin &"
}
rc_cmd $1