diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bad2be8 --- /dev/null +++ b/Makefile @@ -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 diff --git a/sh4rin-openbsd-rc.d b/sh4rin-openbsd-rc.d index 606d895..7bb69a6 100644 --- a/sh4rin-openbsd-rc.d +++ b/sh4rin-openbsd-rc.d @@ -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