chetstone
Occasional Visitor
I want to start shell2http which I installed with entware. I thought services-start would be a good place to start it. I can see in the logs that services-start runs at boot, but it either has an error which is not reported or the service starts and does not keep running. If I run /jffs/scripts/services-start from the command line after boot it does start up and stay running. What is the recommended way to do this?
Here is my services-start script:
```
#!/bin/sh
logger -t "services-start" -c "XXXX" -p user.notice
shell2http -port XXXX /wifioff /jffs/scripts/w0.sh /wifion /jffs/scripts/w1.sh&
```
And here is the log entry showing the script runs at boot:
```
May 4 23:05:26 dropbear[2686]: Running in background
May 4 23:05:26 custom_script: Running /jffs/scripts/services-start
May 4 23:05:26 services-start: XXXX
May 4 23:05:26 custom_script: Running /jffs/scripts/wan-event (args: 0 init)
May 4 23:05:26 wan-event: WAN0, eventType=init
```
And here is me logging in and seeing shell2http is not running, then starting it by hand:
```
ASUSWRT-Merlin RT-AX86U_PRO 3004.388.5_0 Sat Dec 2 17:49:53 UTC 2023
admin@RT-AX86U_Pro-85B8:/tmp/home/root# ps |grep shell
491 admin 0 SW [kbdmf_shell]
4816 admin 5972 D grep shell
admin@RT-AX86U_Pro-85B8:/tmp/home/root# /jffs/scripts/services-start
admin@RT-AX86U_Pro-85B8:/tmp/home/root# 2024/09/05 12:48:07 register: /wifion (/jffs/scripts/w1.sh)
2024/09/05 12:48:07 register: /wifioff (/jffs/scripts/w0.sh)
2024/09/05 12:48:07 register: / (index page)
2024/09/05 12:48:07 listen http://localhost:XXXX/
admin@RT-AX86U_Pro-85B8:/tmp/home/root# ps |grep shell
491 admin 0 SW [kbdmf_shell]
5227 admin 1200m S shell2http -port XXXX /wifioff /jffs/scripts/w0.sh /wifion /jffs/sc
5264 admin 5972 S grep shell
```
Here is my services-start script:
```
#!/bin/sh
logger -t "services-start" -c "XXXX" -p user.notice
shell2http -port XXXX /wifioff /jffs/scripts/w0.sh /wifion /jffs/scripts/w1.sh&
```
And here is the log entry showing the script runs at boot:
```
May 4 23:05:26 dropbear[2686]: Running in background
May 4 23:05:26 custom_script: Running /jffs/scripts/services-start
May 4 23:05:26 services-start: XXXX
May 4 23:05:26 custom_script: Running /jffs/scripts/wan-event (args: 0 init)
May 4 23:05:26 wan-event: WAN0, eventType=init
```
And here is me logging in and seeing shell2http is not running, then starting it by hand:
```
ASUSWRT-Merlin RT-AX86U_PRO 3004.388.5_0 Sat Dec 2 17:49:53 UTC 2023
admin@RT-AX86U_Pro-85B8:/tmp/home/root# ps |grep shell
491 admin 0 SW [kbdmf_shell]
4816 admin 5972 D grep shell
admin@RT-AX86U_Pro-85B8:/tmp/home/root# /jffs/scripts/services-start
admin@RT-AX86U_Pro-85B8:/tmp/home/root# 2024/09/05 12:48:07 register: /wifion (/jffs/scripts/w1.sh)
2024/09/05 12:48:07 register: /wifioff (/jffs/scripts/w0.sh)
2024/09/05 12:48:07 register: / (index page)
2024/09/05 12:48:07 listen http://localhost:XXXX/
admin@RT-AX86U_Pro-85B8:/tmp/home/root# ps |grep shell
491 admin 0 SW [kbdmf_shell]
5227 admin 1200m S shell2http -port XXXX /wifioff /jffs/scripts/w0.sh /wifion /jffs/sc
5264 admin 5972 S grep shell
```