Visit The New, Modern Unix Linux Community

Warning msg from .sh script to web user?

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Warning msg from .sh script to web user?
# 1  
Warning msg from .sh script to web user?

Hello out there,
I got a script that stops and restarts a webapp. I would like to be able to send warning reminders to the webusers as a warning like 5 minutes before it happens. Can I do this an if so how?
# 2  
Certainly it's possible in any number of ways.

One way might be to use a flag-file.



# Remove the file when the restart script quits
trap "rm -f $FLAG" EXIT

touch "$FLAG" || exit

sleep 300


Your webapp would check for the existence of /tmp/myapp-notify and, if it exists, warn users the system will be restarted soon.

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #739
Difficulty: Medium
BASIC was based on FORTRAN II.
True or False?

9 More Discussions You Might Find Interesting

1. What is on Your Mind?

Visualizing MySQL Session : Web Server User Behavior at

Visualizing MySQL Session - Web Server User Behavior The video in this post shows forum user session information in a way that has never been visualized before. I plan to enrich this visualization significantly in the future - it's currently just a first beta. RWBeylgjOqs (0 Replies)
Discussion started by: Neo
0 Replies

2. Linux

Trouble setting up basic user authentication on apache2 web server

Hey guys! So I decided to set up some basic user authentication on my apache2 server, and I am running into some problems. I followed the documentation provided by apache on their website, but I cant create the password file for some reason. I did a little trouble shooting myself, and found... (40 Replies)
Discussion started by: LinuxIntern445
40 Replies

3. Linux

Linux extacting msg from script to console

how to get the outout from script to console. i am running one script using cron job every suday midnight. as soon as i logged in i want to see the staus is service started or service failed on console. what command i need to add to script ? #!/bin/bash if then echo... (1 Reply)
Discussion started by: saku
1 Replies

4. UNIX for Dummies Questions & Answers

How to switch the user before executing a shell script from web page??

hi, i want to execute a shell script as a different user. the flow is like this. there is a html web page from which i have to call a shell script. web server is apache. to call the shell script from html page, a perl script is required. so the html page calls the perl script and the perl... (2 Replies)
Discussion started by: Little
2 Replies

5. Shell Programming and Scripting

help pulling ${VARS} out of a web page user curl

Here is the code I have so far #!/bin/bash INFOF="/tmp/" curl --silent "$INFOF" I want help putting these specs into a vars Standard Ram: value into $VAR1... (1 Reply)
Discussion started by: briandanielz
1 Replies

6. Shell Programming and Scripting

My script is working but why do I get this msg?

Hi, I have a script to determine the max memory to set a worker to start up at. The variable will need to end up being "-Xmx512m" or "-Xmx256m" or "-Xmx768m." Everything works fine BUT when I set the "MEMORY" variable I get the "Cmmand not foundine 40: -Xmx512m" msg though the variable is the... (5 Replies)
Discussion started by: vsekvsek
5 Replies

7. Solaris

Where/What/Howto solve warning/error msg about Kernel patch level?

required Solaris 5.10 Kernel patch 137111-03 required Solaris 5.10 Fibre Channel Device Driver patch 125184-08 I want to know about the descriptions and what the patches will do. I searched (patches/updates) but don't see I am looking for. (1 Reply)
Discussion started by: Y4Net
1 Replies

8. UNIX for Dummies Questions & Answers

connecting to a database through a script...if not give an error msg

Hello , i have a problem in writing the shell script.. i have a script already written n just need to make a change in which when the script is not able to connect to the database should print an error msg on the screen. I have already seen previous posts on how to connect to the... (3 Replies)
Discussion started by: sommer_queen
3 Replies

9. UNIX for Dummies Questions & Answers

add user from web

I am trying to figure out how to add a user from the web (w/ PHP or PERL): is it possible? (2 Replies)
Discussion started by: ryanroth
2 Replies

Featured Tech Videos