What's new

Printing output from service-event???

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

cmkelley

Very Senior Member
/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.
 
There is no console for this script to output to. Send the output to a temp file.


Sent from my P027 using Tapatalk
 
There is no console for this script to output to. Send the output to a temp file.


Sent from my P027 using Tapatalk
Thanks! Wish I understood this stuff better, I'd spend less time running into walls I don't even know are there.
 
Thanks! Wish I understood this stuff better, I'd spend less time running into walls I don't even know are there.
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.
 
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.
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.
 
Similar threads

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top