https://netmaker.org logo
OpenWRT - Connectivity issues
# client
m
OpenWRT - Connectivity issues
I am having difficulties with OpenWRT 21.02.3 on Linksys WRT3200ACM, using Netclient 0.14.6
It starts as healthy, then eventually falls to error
I have ran the installer script, then tried to fix issues as I saw them. I have used latest init.d script from https://github.com/sbilly/netmaker-openwrt
I had Forward set to accept in Openwrt (from default reject)
Home, I have Openwrt at 192.168.110.2, a Linux box at 192.168.110.3
I have at office 192.168.110.1
and Netmaker server is 192.168.110.254
2 and 3 can ping 1 and vice versa, but Netmaker server still says "Error", instead of healthy for OpenWrt
I found my issue
The script at Sbilly Github has correct /bin/sh, but still uses checkin, where 0.14.6 has no longer have such a parameter
I fixed startup, next is stopping 🙂
Stopping is fixed too
#!/bin/sh /etc/rc.common EXTRA_COMMANDS="status" EXTRA_HELP=" status Check service is running" START=99 LOG_FILE="/tmp/netclient.logs" start() { if [ ! -f "${LOG_FILE}" ];then touch "${LOG_FILE}" fi local PID=$(ps|grep "netclient daemon"|grep -v grep|awk '{print $1}') if [ "${PID}" ];then echo "service is running" return fi /bin/sh -c "while [ 1 ]; do netclient daemon >> ${LOG_FILE} 2>&1;sleep 15;\ if [ $(ls -l ${LOG_FILE}|awk '{print $5}') -gt 10240000 ];then tar zcf "${LOG_FILE}.tar" -C / "tmp/netclient.logs" && > $LOG_FILE;fi;done &" echo "start" } stop() { ps | grep netclient | grep -v grep | awk '{print $1}' | xargs kill echo "stop" } status() { local PID=$(ps|grep "netclient daemon"|grep -v grep|awk '{print $1}') if [ "${PID}" ];then echo -e "netclient[${PID}] is running \n" else echo -e "netclient is not running \n" fi }
4 Views