The officially official Devuan Forum!

You are not logged in.

#1 2023-09-14 07:11:17

holala
Member
Registered: 2022-01-04
Posts: 5  

Correct usage of openrc with python scripts

Hello.

I have pepared a simple openrc script to run OpenWebRX. Here it is:

#!/sbin/openrc-run

OWRX_PATH="/home/openwebrx/openwebrx"
PATH=$PATH:/home/openwebrx/openwebrx/
name="OpenWebRX"
#procname=python3
command_user="openwebrx:openwebrx"
command="/usr/bin/python3 /home/openwebrx/openwebrx/openwebrx.py"
command_args=">> /home/openwebrx/log/owrx.log 2>&1"
#output_log="$OWRX_PATH/../log/owrx.std"
#error_log=$OWRX_PATH/../log/owrx.err
command_background=true
pidfile="/run/${RC_SVCNAME}.pid"

The problem is that openrc doesn't obey the

command_user

parameter and the proccess is ran by root.

Would you please give me a hint on how to solve this?

PS: By the way, the command_args seem not to be included also, when I check with

ps

Offline

#2 2023-09-14 09:13:09

soren
Member
Registered: 2023-04-30
Posts: 126  

Re: Correct usage of openrc with python scripts

Im not real sure if this will help but i run artixlinux openrc and openrc scripts are called using the below shebang. Does devuan openrc have that script in /usr/bin ?

#!/usr/bin/openrc-run

Last edited by soren (2023-09-14 09:13:32)

Offline

#3 2023-09-14 11:32:37

holala
Member
Registered: 2022-01-04
Posts: 5  

Re: Correct usage of openrc with python scripts

I confirm that openrc-run is located in /sbin

Offline

Board footer