Martin - SNBuser
Regular Contributor
Hi,
I created all of these files (instructions here: https://github.com/RMerl/asuswrt-merlin/wiki/User-scripts ):
Some of these I really use (nat-start and firewall-start). All files starts with:
When I look in /tmp/syslog I only see two lines with "Hey, I'm working...":
I wanted to see, which is the last of these scripts - and then in the last executed user-script, I wanted to run:
Then I can always easily revert to the iptables, from the last reboot...
My problem is that I don't see logging in any other file than firewall-start and nat-start (maybe because I have real commands in these scripts)? I don't understand why there are not more "Hey, I'm working"-lines in my syslog? I thought if these files where present, the "logger -t ....."-command would always be run, despite that there's nothing else in these files...? Any comments?
I created all of these files (instructions here: https://github.com/RMerl/asuswrt-merlin/wiki/User-scripts ):
Code:
services-stop
wan-start
firewall-start
nat-start
init-start
pre-mount
post-mount
unmount
dhcpc-event
openvpn-event
ddns-startb
Code:
#!/bin/sh
logger -t "$0" "Hey, I'm working - in /jffs/scripts/..."
Code:
...
Sep 29 23:46:40 start_nat_rules: apply the nat_rules(/tmp/nat_rules_eth0_eth0)!
Sep 29 23:46:41 custom script: Running /jffs/scripts/nat-start
Sep 29 23:46:41 /jffs/scripts/nat-start: Hey, I'm working - in /jffs/scripts/...
Sep 29 23:46:41 custom script: Running /jffs/scripts/firewall-start (args: eth0)
Sep 29 23:46:41 /jffs/scripts/firewall-start: Hey, I'm working - in /jffs/scripts/...
...
Code:
iptables-save > /tmp/iptables-save.txt
My problem is that I don't see logging in any other file than firewall-start and nat-start (maybe because I have real commands in these scripts)? I don't understand why there are not more "Hey, I'm working"-lines in my syslog? I thought if these files where present, the "logger -t ....."-command would always be run, despite that there's nothing else in these files...? Any comments?