Hi,
I've created a test enviroment on my Dream-Two: Both executables seem to start one after the other.
Here is what I have done:
1. Create new script (NewSupcam.service)
-------------------------------------------------
[Unit]
Description=Supcam
Requires=dev-dvb-adapter0-ca0.device dev-dvb-adapter0-demux0.device dev-sci0.device
After=dev-dvb-adapter0-ca0.device
After=dev-dvb-adapter0-demux0.device
After=dev-sci0.device
[Service]
Type=forking
ExecStart=/usr/bin/oscam-emu-00 -b -B -r 2 -w 1 -c /etc/tuxbox/Test & << Change this
Restart=on-failure
NonBlocking=true
NotifyAccess=main
[Install]
WantedBy=multi-user.target
Also=NewSupcam.socket
-------------------------------------------------
you need to replace the ExecStart with yours -> /usr/local/etc/oscammips -b -B -r 2 -w 1 -c /usr/local/etc &
2.) create (NewSupcam.socket)
-------------------------------------------------
[Unit]
[Socket]
ListenStream=/var/run/osccam.pid
Backlog=8
[Install]
WantedBy=sockets.target
--------------------------------------------
3) Link NewSupcam.service into your original script
This is my script (emu-osca.Test.service)
--------------------------------------------
[Unit]
Description=Test
Requires=emu-oscam.Test.socket dev-dvb-adapter0-ca0.device dev-dvb-adapter0-demux0.device dev-sci0.device NewSupcam.service <<<<<< Link here
After=dev-dvb-adapter0-ca0.device
After=dev-dvb-adapter0-demux0.device
After=dev-sci0.device
After=NewSupcam.service <<<<<< Link here
[Service]
Type=forking
ExecStart=/usr/bin/oscam-emu-11.689 -b -B -r 2 -w 1 -c /etc/tuxbox/Test &
Restart=on-failure
NonBlocking=true
NotifyAccess=main
[Install]
WantedBy=multi-user.target
Also=emu-oscam.Test.socket
--------------------------------------------
4) I went through the Telnet running (systemctl start emu-oscam.Test.service)
5) check service status (systemctl status emu-oscam.Test.service or journalctl -u emu-oscam.Test.service)
● emu-oscam.Test.service - Test
Loaded: loaded (/lib/systemd/system/emu-oscam.Test.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2021-03-24 01:00:50 CET; 9min ago
Process: 650 ExecStart=/usr/bin/oscam-emu-11.689 -b -B -r 2 -w 1 -c /etc/tuxbox/Test & (code=exited, status=0/SUCCESS)
Main PID: 651 (oscam-emu-11.68)
CGroup: /system.slice/emu-oscam.Test.service
├─651 /usr/bin/oscam-emu-11.689 -b -B -r 2 -w 1 -c /etc/tuxbox/Test &
└─652 /usr/bin/oscam-emu-11.689 -b -B -r 2 -w 1 -c /etc/tuxbox/Test &
Mar 24 01:00:50 dreambox systemd[1]: Starting Test...
Mar 24 01:00:50 dreambox systemd[1]: Started Test.
5) check service status (systemctl status NewSupcam.service)
● NewSupcam.service - Supcam
Loaded: loaded (/lib/systemd/system/NewSupcam.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2021-03-24 01:00:50 CET; 10min ago
Process: 635 ExecStart=/usr/bin/oscam-emu-00 -b -B -r 2 -w 1 -c /etc/tuxbox/Test & (code=exited, status=0/SUCCESS)
Main PID: 636 (oscam-emu-00)
CGroup: /system.slice/NewSupcam.service
├─636 /usr/bin/oscam-emu-00 -b -B -r 2 -w 1 -c /etc/tuxbox/Test &
└─637 /usr/bin/oscam-emu-00 -b -B -r 2 -w 1 -c /etc/tuxbox/Test &
Mar 24 01:00:50 dreambox systemd[1]: Starting Supcam...
Mar 24 01:00:50 dreambox systemd[1]: Started Supcam.
-----------------
604 ? 00:00:00 kworker/1:1H
615 ? 00:00:00 telnetd
616 pts/0 00:00:00 bash
621 ? 00:00:00 vsftpd
623 ? 00:00:00 vsftpd
636 ? 00:00:00 oscam-emu-00 <<<
637 ? 00:00:01 oscam-emu-00 <<<
651 ? 00:00:00 oscam-emu-11.68 <<<
652 ? 00:00:01 oscam-emu-11.68 <<<
676 ? 00:00:00 irq/27-ff642000
677 ? 00:00:00 irq/28-ff642000
2065 ? 00:00:00 tb_detect
2066 ? 00:00:00 ppmgr
2167 pts/0 00:00:00 ps
Cheers