OpenBCM V1.08-5-g2f4a (Linux)

Packet Radio Mailbox

IZ3LSV

[San Dona' di P. JN]

 Login: GUEST





  
K5DAT  > PACKET   13.02.20 09:08l 74 Lines 1903 Bytes #999 (0) @ WW
BID : 21495_K5DAT
Read: GUEST
Subj: Starting linbpq from systemd
Path: IZ3LSV<ED1ZAC<EA5URD
Sent: 200213/0550Z @:EA5URD.EAMU.ESP.EU #:6021 XFBB7.04h Bid:21495_K5DAT

R:200213/0547Z @:EA2RCF.EAVI.ESP.EU #:53256 [Vitoria] $:21495_K5DAT
R:200213/0546z @:SR1BSZ.SZ.POL.EU $:21495_K5DAT
R:200213/0547z @:OK0NBR.SP.BRA.SOAM $:21495_K5DAT
R:200213/0546z @:IW0QNL.IUMB.ITA.EU $:21495_K5DAT
R:200213/0546z @:JH4XSY.13.JNET1.JPN.AS $:21495_K5DAT
R:200213/0534Z 12556@N3HYM.MD.USA.NOAM BPQ6.0.19
R:200213/0546Z 28534@KC9VYU.#NEIN.IN.USA.NOAM LinBPQ6.0.19
R:200213/0546Z 43980@W9GM.#SWWI.WI.USA.NOAM BPQK6.0.19
R:200213/0546Z 21495@K5DAT.#CWI.WI.USA.NOAM LinBPQ6.0.19

Actually starting linbpq (or any application) via systemd as
a non-root user can be done within the systemd service.


(Create a text file named linbpq.service in /etc/systemd/system)
The contents of linbpq.service would look like this if 
the user and primary group are bpq. Adjust user, group
and path to linbpq executable as needed.


[Unit]
After=network.target

[Service]
User=bpq
Group=bpq
ExecStart=/home/bpq/linbpq
Restart=always

[Install]
WantedBy=multi-user.target


After creating the linbpq.service file, issue these commands as was noted before:

sudo systemctl daemon-reload
sudo systemctl enable linbpq.service

The second one will result in starting linbpq at bootup.

I run linbpq under screen, so my linbpq.service file looks like this:
Note my user and group are lee, and the path is different - so modify
as necessary.

[Unit]
Description=BPQ
After=network.target

[Service]
Type=forking
WorkingDirectory=/home/lee/BPQ
User=lee
Group=lee
ExecStart=/usr/bin/screen -S bpq -d -m /home/lee/BPQ/linbpq
SyslogIdentifier=BPQ

[Install]
WantedBy=multi-user.target


The above runs linbpq in a detached screen session named bpq.
To attach to the session, issue...
screen -r bpq
Attaching to the session allows you to see whether or not BPQ started properly.
To detach, issue...
Ctrl-a d

You might need to install screen - (sudo apt-get install screen)
if Debian/Raspian or Ubuntu.


73,
Lee K5DAT


Read previous mail | Read next mail


 20.09.2024 08:43:24lGo back Go up