Skip to content

Instantly share code, notes, and snippets.

@ruzickap
Created June 4, 2019 05:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruzickap/63c01147627daf4641f394fa5acc9420 to your computer and use it in GitHub Desktop.
Save ruzickap/63c01147627daf4641f394fa5acc9420 to your computer and use it in GitHub Desktop.
Debug service on OpenWrt
sed -r -i 's%^(#!.*)%\1\nset -x -v\nexec \&>/tmp/ddns-init.log%' /etc/init.d/ddns
sed -r -i 's%^(#!.*)%\1\nset -x -v\nexec \&>/tmp/ddns-hotplug.log%' /etc/hotplug.d/iface/95-ddns
sed -r -i 's%^(#!.*)%\1\nset -x -v\nexec \&>/tmp/ddns-updater.log%' /usr/lib/ddns/dynamic_dns_updater.sh
# $ head -5 /etc/init.d/ddns
# #!/bin/sh /etc/rc.common
# set -x -v
# exec &>/tmp/ddns-init.log
# START=95
# STOP=10
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment