Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Warning msg from .sh script to web user? Post 302701127 by Corona688 on Friday 14th of September 2012 06:15:35 PM
Old 09-14-2012
Certainly it's possible in any number of ways.

One way might be to use a flag-file.

Code:
#!/bin/sh

FLAG="/tmp/myapp-notify"

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

touch "$FLAG" || exit

sleep 300

restart_app

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

9 More Discussions You Might Find Interesting

1. 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

2. 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 ..it 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

3. 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 www.sun.com (patches/updates) but don't see I am looking for. (1 Reply)
Discussion started by: Y4Net
1 Replies

4. 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

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/mac.info" curl --silent http://www.everymac.com/systems/apple/macbook_pro/specs/macbook-pro-core-2-duo-2.8-aluminum-17-mid-2009-unibody-specs.html "$INFOF" I want help putting these specs into a vars Standard Ram: value into $VAR1... (1 Reply)
Discussion started by: briandanielz
1 Replies

6. 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

7. Linux

Linux extacting msg from script to console

how to get the outout from script to console. i am running one script msg.sh 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 ? msg.sh #!/bin/bash if then echo... (1 Reply)
Discussion started by: saku
1 Replies

8. 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

9. What is on Your Mind?

Visualizing MySQL Session : Web Server User Behavior at UNIX.com

Visualizing MySQL Session - Web Server User Behavior The video in this post shows unix.com 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
MAKE-KLONE-PROJECT(1)					      General Commands Manual					     MAKE-KLONE-PROJECT(1)

NAME
make-klone-project - manage a KLone based custom Debian package SYNOPSIS
make-klone-project [options] COMMAND DESCRIPTION
make-klone-project is a tool to create and manage custom webserver packages that use KLone, a framework that integrates a web site with possibly dynamic content and a web server into a single binary. The aim is to let the author to focus on editing the site specific files under webapp/ and allow creating a Debian package containing the web server and an init.d script to manage it with dpkg-buildpackage. USAGE
make-klone-project takes one non-option argument. create Create a new project directory, package-0.1 and seeds it with KLone's source and a debian/ directory. clean Remove all non-user created files and directories ie. everything but debian/copyright, debian/changelog, debian/wsp.* and webapp/. See also the -l option below. refresh Cleans the project directory as with make-klone-project clean and reseeds the KLone source and the debian/ directory. EXAMPLES
make-klone-project create -p myapp -m "Kari Pahula <kaol@debian.org>" cd myapp-0.1 (edit any files that require editing, mostly in webapp/) make-klone-project refresh dpkg-buildpackage -rfakeroot sudo dpkg -i ../myapp_0.1_i386.deb OPTIONS
-b NAME Name the created web server binary as NAME. If not specified the package name is used. -l Look for the project root directory in clean and refresh commands by changing the working directory to the parent directory until they find a file named debian/wsp.opt.maintainer in the current directory. Returns with error if none is found. Without this op- tion, only the current directory is checked for this file. The upside of using this option is that make-klone-project will be agnostic about the working directory, as long as it is somewhere inside the project tree, just like dpkg-buildpackage. The downside is that you run a greater risk of having the clean command cause unwanted data loss, if you happen to have an unfortunately named file in a wrong place. -m NAME Sets the maintainer name as NAME. -p NAME Set the package name as NAME. Only effective with the create command. If not specified, uses customkloneapp. FILES
debian/wsp.description A custom description for the package. Should be formatted like the corresponding field in the debian/control file. debian/wsp.opt.* The options set in prior calls to make-klone-project. webapp/ The user specified site tree, to be imported as the site by KLone. NOTES
Your web server will be run as a root, so you will need to use either allow_root or uid and gid options in your etc/kloned.conf. SEE ALSO
dpkg-buildpackage(1), klone(1), kloned.conf(5), kloned(8). AUTHOR
make-klone-project was written by Kari Pahula <kaol@debian.org>. 16 Sep 2007 MAKE-KLONE-PROJECT(1)
All times are GMT -4. The time now is 07:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy