Submitted by ChrisBlackwell on Mon, 03/09/2015 - 16:16
i've got a script running post creation and post deletion which echos some messages, this works fine when executed manually from the shell, but when the messages get display by webmin they all on the same line.
I could include
's in the messages, but thats horrible.
Could you wrap the messages returned from per/post commands in a
<
pre> tag or css equivalent ?
example output
Deleted tomcat host config file /opt/tomcat/conf/vhosts/test3.com.xml
Updating tomcat vhost configuration /opt/tomcat/conf/vhosts-include.xml
Restarting tomcat
Stoping Tomcat
waiting for processes to exit
Starting tomcat
Tomcat started.
Tomcat is running with pid: 11178
ends up looking like
Deleted tomcat host config file /opt/tomcat/conf/vhosts/test3.com.xml Updating tomcat vhost configuration /opt/tomcat/conf/vhosts-include.xmlRestarting tomcatStopingTomcatwaiting for processes to exitStarting tomcatTomcat started.Tomcat is running with pid: 11178
Status:
Active
Comments
Submitted by JamieCameron on Mon, 03/09/2015 - 22:06 Comment #1
You could include HTML tags in the post-command output, like <br> to indicate a newline.
Submitted by ChrisBlackwell on Tue, 03/10/2015 - 02:05 Comment #2
I did mention that in my OP, but the <br> got lost in the post. I could do that, but then I get them on the command line when I use the tool outside virtualmin.
Submitted by JamieCameron on Tue, 03/10/2015 - 18:34 Comment #3
Perhaps have the command check it's environment to see if it is being executed via virtualmin or not, and modify the output appropriate?