diff options
author | feld <feld@feld.me> | 2024-06-21 15:35:48 +0000 |
---|---|---|
committer | feld <feld@feld.me> | 2024-06-21 15:35:48 +0000 |
commit | 93eb458c24ca534ac43de03ea845a3ea24605f7e (patch) | |
tree | 81bee3a4d348caf87ab5298c353a9e3e027a78c5 /installation/netbsd/rc.d | |
parent | 73916dbeadaab6caa24df20126bcc6be6d482d89 (diff) | |
parent | b33b1b7253592db3e4c7f5c06c117d4cbf125bd6 (diff) | |
download | pleroma-93eb458c24ca534ac43de03ea845a3ea24605f7e.tar.gz pleroma-93eb458c24ca534ac43de03ea845a3ea24605f7e.zip |
Merge branch 'netbsd-wip' into 'develop'
update docs for NetBSD
See merge request pleroma/pleroma!4150
Diffstat (limited to 'installation/netbsd/rc.d')
-rwxr-xr-x | installation/netbsd/rc.d/pleroma | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/installation/netbsd/rc.d/pleroma b/installation/netbsd/rc.d/pleroma index 1114668ee..c70112c3b 100755 --- a/installation/netbsd/rc.d/pleroma +++ b/installation/netbsd/rc.d/pleroma @@ -1,11 +1,14 @@ #!/bin/sh # PROVIDE: pleroma -# REQUIRE: DAEMON pgsql +# REQUIRE: DAEMON pgsql nginx if [ -f /etc/rc.subr ]; then . /etc/rc.subr fi +pleroma_home="/home/pleroma" +pleroma_user="pleroma" + name="pleroma" rcvar=${name} command="/usr/pkg/bin/elixir" @@ -19,10 +22,10 @@ pleroma_env="HOME=${pleroma_home} MIX_ENV=prod" check_pidfile() { pid=$(pgrep -U "${pleroma_user}" /bin/beam.smp$) - echo -n "${pid}" + printf '%s' "${pid}" } -if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then +if [ -f /etc/rc.subr ] && [ -d /etc/rc.d ] && [ -f /etc/rc.d/DAEMON ]; then # newer NetBSD load_rc_config ${name} run_rc_command "$1" @@ -39,7 +42,7 @@ else stop) echo "Stopping ${name}." check_pidfile - ! [ -n ${pid} ] && kill ${pid} + ! [ -n "${pid}" ] && kill "${pid}" ;; restart) |