diff options
author | Pleroma User <keine@partyheld.de> | 2024-07-06 13:59:30 +0000 |
---|---|---|
committer | Pleroma User <keine@partyheld.de> | 2024-07-06 13:59:30 +0000 |
commit | e4ba5777ee1c0c1d9b079f8aca1b6d9cce014571 (patch) | |
tree | e246a73319fcceddd4cda50b422e3549bbc5b1aa /installation/netbsd/rc.d | |
parent | 56927ffd22e9da98a5c7c4b864d9a70e600a30fa (diff) | |
parent | 9e3633501bca98a9df34ed3231e55ed038dd86b7 (diff) | |
download | pleroma-e4ba5777ee1c0c1d9b079f8aca1b6d9cce014571.tar.gz pleroma-e4ba5777ee1c0c1d9b079f8aca1b6d9cce014571.zip |
Merge branch 'develop' into 'move-poison'
# Conflicts:
# mix.exs
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) |