1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Printing output from service-event???

Discussion in 'Asuswrt-Merlin' started by cmkelley, Feb 11, 2019.

Tags:
  1. cmkelley

    cmkelley Senior Member

    Joined:
    Aug 11, 2015
    Messages:
    360
    Location:
    Greater Los Angeles Area, California, USizicstania
    /jffs/scripts/service-event runs anytime the command "service" is called (e.g. service restart_httpd). But it somehow prevents any writing to the screen! I've tried '>> /dev/tty' & '>>/dev/console' but to no avail. Is it not possible to force something to output to the screen when service is running?

    It's not a show-stopper, but it's annoying and makes debugging a pain.
     
  2. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    29,068
    Location:
    Canada
    There is no console for this script to output to. Send the output to a temp file.


    Sent from my P027 using Tapatalk
     
  3. cmkelley

    cmkelley Senior Member

    Joined:
    Aug 11, 2015
    Messages:
    360
    Location:
    Greater Los Angeles Area, California, USizicstania
    Thanks! Wish I understood this stuff better, I'd spend less time running into walls I don't even know are there.
     
  4. joegreat

    joegreat Very Senior Member

    Joined:
    Jan 9, 2013
    Messages:
    1,685
    Location:
    Vienna, Austria
    Hi,

    You can use this approach I posted some time ago, which will log the start and stop of the script into syslog and all outputs to a separate temp-file per script.
     
  5. cmkelley

    cmkelley Senior Member

    Joined:
    Aug 11, 2015
    Messages:
    360
    Location:
    Greater Los Angeles Area, California, USizicstania
    Right, that's effectively what I ended up doing. I would have just liked to have been able to provide screen feedback from the service-event script, which it turns out isn't possible.