diff options
author | marcin mikołajczak <git@mkljczk.pl> | 2024-07-28 13:41:58 +0200 |
---|---|---|
committer | marcin mikołajczak <git@mkljczk.pl> | 2024-07-28 13:41:58 +0200 |
commit | ad8c26f6c285412be041b7dcaeefa8741d3a6e57 (patch) | |
tree | 041e9af5f9b64215f12d195d6c98b548b0c1b622 /installation/netbsd/rc.d | |
parent | 7620b520c13a1c204810cf0cfe6a7b70b9a1c59d (diff) | |
parent | 6876761837bad399758cd6a93be5bf5cc8a81cef (diff) | |
download | pleroma-ad8c26f6c285412be041b7dcaeefa8741d3a6e57.tar.gz pleroma-ad8c26f6c285412be041b7dcaeefa8741d3a6e57.zip |
Merge remote-tracking branch 'origin/develop' into post-languages
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) |