I would not suggest building a solution that involves a script running an infinite loop. Why not loop until a "stop" file is found, e.g...
Instead of killing the script, it can be stopped by using:
Hello,
I have the following script to restore file and grep information. However, once it restore file, it showing a lot useless information and different to check which file have the statement "John price $200". Can I not show any information while running script. It only show..when found the... (1 Reply)
Hi,
facing unusual problem, below are 2 same scripts, one is working and other is not. please help
--- THIS SCRIPT IS WORKING FINE!!!!
#! /bin/sh
phone=`grep "<phone>" data.xml | sed 's:<phone>::;s:</phone>::'`
echo "Phone Number is:"$phone
repnum=554156
cat data.xml | sed -e... (3 Replies)
Thank you all for helping me figure out how to manage spaces in paths. The following script is the result. The script uses rsync to backup files to a USB device. Special thanks to Scrutinizer:b:.
rsync2u is a free menu-driven script. Down load the script from... (7 Replies)
Hi! I'm new in scripting and I need some help with one simple script. I have to write a program that shows in a predetermined period (using "last" command), to draw up a list of users who have used the machine during this period. Each user to indicate how many sessions it has been during this... (9 Replies)
Dear all,
I am bit confused lately, I have a xmlfile here:
file: book.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book category="COOKING">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
... (2 Replies)
how to check which line of the script is showing the error...
like -x will print each output in stdout...
but want to know exact error line trowing error.. (2 Replies)
I am new to linux/unix scripting and working in one company on linux project. I got a script that when it executes should give us the users atributes showing who is retriving data? the script should show us who are the users reriving information. I ran that script as sudo ./test4 but finding
the... (0 Replies)
code:
IMAGE=$imgvalue;
if
then
echo DO=ABC;
elif
then echo DO=ETC;
elif
then echo DO=XYZ;
else
echo "$imgvalue is unsupported";
exit 1;
fi
in above script IMAGE=1 , IMAGE=2, IMAGE=3 whatever may be the value i have assigned it's showing only DO=ABC other conditions... (7 Replies)
Hello scripting geeks,
I am new to scripting and facing some issues in writing the logic of the script. Request your kind help here
Actually when i run a command i get o/p as below
o/p :
0x0000
0x0000
0x0000
0x0000
0x0000
0x0000
these are hex values i guess...now i want to... (15 Replies)
what does the below command do
ps –efx | grep java6
Another question, what is crontab?
Please use CODE tags as required by forum rules! (1 Reply)
Discussion started by: houmingc
1 Replies
LEARN ABOUT DEBIAN
safe_asterisk
SAFE_ASTERISK(8) Linux Programmer's Manual SAFE_ASTERISK(8)NAME
safe_asterisk -- A wrapper to run the asterisk executable in a loop
SYNOPSIS
safe_asterisk [ asterisk_params ]
DESCRIPTION
safe_asterisk is a script that runs asterisk in a loop, which can be useful if you fear asterisk may crash.
The script does not run in the background like a standard service. Rather, it runs in its own linux virtual console (9, by default). It
also uses the option '-c' of asterisk(8) to avoid detaching asterisk from that terminal.
safe_asterisk also runs asterisk with unlimited core file size, and thus asterisk will dump core in case of a crash.
To get a "picture" of console 9, from another terminal (e.g: from a remote shell session) you can use:
screendump 9
The init script of the Debian package should be able to run safe_asterisk as the asterisk service, if so configured. See coments in
/etc/default/asterisk
FILES
/tmp
safe_asterisk runs in that directory, rather than in / as usual.
/tmp/core
If core files were generated there, they may be
/etc/asterisk/startup.d
Files in this directory will be 'source'd by the safe_asterisk script before it starts Asterisk proper, allowing them to set addi-
tional environment variables or run any other steps that are needed for your system.
BUGS
While showing the output on a console is useful, using screen(1) as the terminal may be better.
The script does not read configuration from standard location under /etc
It uses fixed locations under /tmp , and thus may be exposed to a symlink attacks.
SEE ALSO asterisk(8), screendump(9)AUTHOR
This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com> Permission is granted to copy, distribute and/or modify this docu-
ment under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.
Asterisk Jun 30th, 2005 SAFE_ASTERISK(8)