More debug data:
sh -x /etc/rc.d/guni check
...
+ eval _rctimeout=${guni_timeout}
+ _rctimeout=
+ getcap -f /etc/login.conf testuser
+ > /dev/null
+ 2>&1
+ daemon_class=daemon
+ [ -z ]
+ daemon_rtable=0
+ [ -z ]
+ daemon_user=root
+ [ -z 60 ]
+ [ -n -o check != start ]
+ [ X-c /home/testuser/stuff/main.ini -D flaskapp:app = XNO ]
+ [ -n -c /home/testuser/stuff/main.ini -D flaskapp:app ]
+ daemon_flags=-c /home/testuser/stuff/main.ini -D flaskapp:app
+ [ -n ]
+ [ -n testuser ]
+ daemon_user=testuser
+ [ -n ]
+ [ -n ]
+ readonly daemon_class
+ unset _rcflags _rcrtable _rcuser _rctimeout
+ eval echo /usr/local/bin/gunicorn-3 -c /home/testuser/stuff/main.ini -D
flaskapp:app
+ echo /usr/local/bin/gunicorn-3 -c /home/testuser/stuff/main.ini -D
flaskapp:app
+ pexp=/usr/local/bin/gunicorn-3 -c /home/testuser/stuff/main.ini -D
flaskapp:app
+ rcexec=su -l -c daemon -s /bin/sh testuser -c
+ id -R
+ [ 0 -eq 0 ]
+ rc_cmd check
guni(failed)
On April 14, 2020 3:30:40 PM GMT+02:00, Flipchan <[email protected]> wrote:
>Hey, im trying to run a python app with gunicon-3 and rcctl
>
>computer# cat /etc/rc.conf.local
>httpd_flags=
>guni_flags="-c /home/testuser/stuff/main.ini -D flaskapp:app"
>guni_user=testuser
>pkg_scripts=tor
>
>computer# cat /etc/rc.d/guni
>#!/bin/ksh
>#
># $OpenBSD: Exp $
>
>daemon="/usr/local/bin/gunicorn-3"
> . /etc/rc.d/rc.subr
>
>#rc_pre() { # rm /home/testuser/stuff/pid.pid #}
>
>rc_stop() {
>kill -9 `cat /home/testuser/stuff/pid.pid`
># rm /home/testuser/stuff/pid.pid
>}
>rc_cmd $1
>
>#cat /home/testuser/stuff/main.ini
>bind = "0.0.0.0:8801"
>workers = 5
>pidfile = '/home/testuser/stuff/pid.pid'
>
>so this works:
>/usr/local/bin/gunicorn-3 -c /home/testuser/stuff/main.ini -D
>flaskapp:app
>
>but rcctl start guni just returns ok as it was started and doesnt start
>it.
> what am i doing wrong? Thanks
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.