Script to automate a service message

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Script to automate a service message
# 1  
Old 10-24-2017
Script to automate a service message

Hi

I am trying to figure out, on how to automate whether in a simple script or using awk/sed/grep commands to automate a "service.message" file which has tag separated message stating as;

"There is currently no outage or system is unavailable for duration of change....", therefore, when users log into the application front end they will see this message and phone number/email etc and they click on dismiss or continue to progress. Image attached.

I am only interested in the service message portion, to include few lines, nothing else...How can this be achieved using any regular expression commands or simple script?

Thanks.
GSmilie
Script to automate a service message-service_messagesjpg
# 2  
Old 10-24-2017
What operating system and version are you using?

Search this forum and the web for '/etc/motd' (which stands for "message of the day").

Do you want users to see your message when they login to the system or when they launch a particular application?
# 3  
Old 10-25-2017
Hi

I am using Linux version 7.2 and I want users to see the message when they log into the application via front end i.e. url. And here they will see the message and click on dismiss continue etc... This could be when we are delivering a new release, every quarter and so on.

At the moment it is just manual process, and just needs the message portion, few lines automating, within a .sh script probably will do the trick.

Hope this helps. Please Advise.
Gaz

---------- Post updated at 12:42 PM ---------- Previous update was at 09:46 AM ----------

The other thing is /etc/motd probably works as if you are logging into a shell rather than displaying this message on front end application, so been searching around, don't think that will be helpful?

I don't know if there is something sed command or simpler which can replace or setup custom tags between the service message?

Let me know your thoughts.
Thanks

Last edited by Gamma; 10-25-2017 at 08:39 AM.. Reason: Adding few further details
# 4  
Old 10-25-2017
Quote:
Originally Posted by Gamma
Hi I am using Linux version 7.2 and I want users to see the message when they log into the application via front end i.e. url.
So users connect to the application via a URL so shouldn't this be coded in html rather than a Unix shell?
# 5  
Old 10-25-2017
Yes, it could be in html as currently the file which has that service message line "xxxxx" is in html. Therefore, I thought there could be something using some file manipulation commands to read from another file to achieve this though...maybe not....

Any idea's?
Thanks
# 6  
Old 10-25-2017
What is your application? What language is it written in? It'd make more sense to do so in the application.
# 7  
Old 10-25-2017
Hi

Its an application used for criminal justice system running on backend WebSphere/Linux and DB2.

You cant do it from the app, otherwise it would have been done but its been done manually by editing the service.message file but we just want this portion updated...whether its a one liner, realistically speaking not really required to invest time and effort but business want this automated so the transition team then can support the app and run the automation in future.

I was looking at SED, today, maybe there is some way to set this up...
Hope this Helps.

Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

automate the script

Dear all, I I want to login to my Linux machine using putty and then run some script from Windows machine.we can do it after loging it and then execute the script by typing it in putty command line screen. but I want to automate it.So whenever I will fire this script,it will do the following... (4 Replies)
Discussion started by: smartgupta
4 Replies

2. AIX

Short Message Service from AIX

Hi AIX Guru's, I am a bit new to this AIX stuff . Does anyone of you know how to send SMS messages from an AIX box. We are able to send emails to the internet from this AIX box , and I was hoping sending SMS's would be something similar Any help would be greatly appreciated . Please... (4 Replies)
Discussion started by: smdasim
4 Replies

3. Shell Programming and Scripting

mail script to automate

Hi, Here below the logs from the mail server: less /var/log/messages: Sep 6 04:03:31 server-59 out: 1252227811|webmaster@zilia.com|antonino.granata@gmail.com|2175|success|1 Sep 6 04:03:33 server-59 in: 1252227813|news@tarot.com|junk@thess.com|30376|success|1 Sep 6 04:03:35 server-59... (8 Replies)
Discussion started by: gsiva
8 Replies

4. Shell Programming and Scripting

How can I automate a script?

Hi All, Can I automate a script when some one trying to 'vi' (open) a file. For Example, I am having a file named 'SecuredShell.sh'. when a user types " vi SecuredShell.sh " in unix command prompt a script named secure.sh needs to be automated. Can this be possible. if Yes please guide... (2 Replies)
Discussion started by: little_wonder
2 Replies

5. UNIX for Dummies Questions & Answers

Message Service Using kannel

Any body having idea or implemented SMS service with kannel..? Please help... (1 Reply)
Discussion started by: noufal
1 Replies

6. Shell Programming and Scripting

Automate Script ***V. Urgent

Hi All, ./procdure.ksh which opens the below the menu, I want to build a script which will press 4 and run the Sector Data Automatically (instead of pressing option 4 manually) Is there any way for this, please let me know... 1) FX Rates MDU 9) Fidessa Cash... (7 Replies)
Discussion started by: niceboykunal123
7 Replies

7. Shell Programming and Scripting

Automate shell script

I would like to automate script where i do not have to manually insert the username and password I wrote two different scripts but not able to achieve the results: here's to scripts i wrote #!/bin/bash cd /var/tmp /home/server/steve/pca --askauth -idx /opt/app/bin/expect <<EOF expect... (3 Replies)
Discussion started by: sam786
3 Replies

8. UNIX for Advanced & Expert Users

Shell Script to Automate

I would like to automate script where i do not have to manually insert the username and password I wrote two different scripts but not able to achieve the results: here's to scripts i wrote #!/bin/bash cd /var/tmp /home/server/steve/pca --askauth -idx /opt/app/bin/expect <<EOF expect... (1 Reply)
Discussion started by: sam786
1 Replies

9. Shell Programming and Scripting

here document to automate perl script that call script

I am trying to use a here document to automate testing a perl script however when the perl script hits a system(perl subscript.pl) call, input is no longer entered into this subscript. here is my script $ cat test.sh #ksh for testcase do program <<-EOF | tee -a funcscnlog.log y... (3 Replies)
Discussion started by: hogger84
3 Replies

10. UNIX for Dummies Questions & Answers

automate the input in a script

I have a program that i have to run by cron. The program needs user input. So i have to automate that in a littke script. start of script program.sh: result=program.log; export result echo Program starting : `date` >> $result /usr/local/program >> $result echo Program running : `date` >>... (11 Replies)
Discussion started by: erwinspeybroeck
11 Replies
Login or Register to Ask a Question