10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi Guys -
I'm getting the following error when I run my script:
which: no Data_Export.sh in (.)
However, my code completes with fine with a return code of 0. The above error message gets directed to my error file.
Any ideas?
Here is my script:
#source... (1 Reply)
Discussion started by: SIMMS7400
1 Replies
2. Shell Programming and Scripting
Hi Everyone,
I am trying to make this script to use, to find out the DAHDI channel status. Every thing works fine, I even get proper results, however I have this weird error that comes along.
Can someone please help me. Thanks a lot.
#!/bin/bash
# Color to set the test to when a channel is... (3 Replies)
Discussion started by: jeetz
3 Replies
3. Shell Programming and Scripting
Here is the awk code i wrote :
if ; then
gawk -v field_position="$field_position" -v field_length="$field_length" -v header="$header" -v trailer="$trailer" -v lr="$lr" '{
if(NR==1&&header=="1")
{
next
}
if(NR==lr&&trailer=="1")
{
next
}... (1 Reply)
Discussion started by: ysvsr1
1 Replies
4. Shell Programming and Scripting
I have having a heck of a time figuring this out so any help is much appreciated.
Here is the code where it seems to be dying, I bolded the part it is complaining about:
$sth = $dbh->prepare( $query ) or die "error with query\n";
$sth->execute() or die "error executing query ...\n";
while(... (1 Reply)
Discussion started by: savigabi
1 Replies
5. Ubuntu
I'm fairly new to unix and I was trying to change the name of my host and my user. I changed the name in /hostname using this: gksudo gedit /etc/hostname I then tried changing the name back but it still gave the same error: {env_reset,... (1 Reply)
Discussion started by: H3jck
1 Replies
6. Shell Programming and Scripting
hi all,
i am writing a wrapping script to burn subtitle into video file using transcode. I got this very weird error:
code:
inFile="movie.avi"
subFile="sub.srt"
outFile="movie_sub.avi"
strExc="-i $inFile -x 'mplayer=-sub $subFile' -w $vidBR -o $outFile -y xvid"
echo "transcode $strExc"... (2 Replies)
Discussion started by: tduccuong
2 Replies
7. Programming
I have some unstable mistake in my program and out-of-idea how to catch it.
I am looking for advice with a way to work it out!
I have in a pretty complicated program (but one source file) set of int-counters - 15, if exactly.
Lately, on final printout I have inpossible value (I am... (3 Replies)
Discussion started by: alex_5161
3 Replies
8. Web Development
Hi All,
I am seeking some help. While trying to access my website: EDITED (hosted on private server somewhere - don't want to publicize names) - I have a weird behaviour:
I can always get to the site - but some applications get a 500 Internal error.
If I use FireBug (mozilla addon) I can... (2 Replies)
Discussion started by: saariko
2 Replies
9. UNIX for Dummies Questions & Answers
All,
I have the following listing of files
$ ls -lrt
-rw-rw-rw- 1 user1 group1 335691 Aug 4 17:45 script1.sh
-rw-rw-rw- 1 user1 group1 648 Aug 4 17:45 try,csv
-rw-rw-rw- 1 user1 group1 1381275 Aug 4 17:45 test.txt
-rw-rw-rw- 1 user1 group1 ... (7 Replies)
Discussion started by: rahulrathod
7 Replies
10. UNIX for Dummies Questions & Answers
$ls -lrt
-rw-r--r-- 1 rathodr users 1757 Jan 6 13:36 cleanup.archive.files.pl
-rwxr-xr-x 1 rathodr users 20503 Jan 6 13:52 alarm.control.pl
-rw-r--r-- 1 rathodr users 20503 Jan 9 04:52q
The last file seems to be a weird file. I am not sure how was it created. Maybe... (5 Replies)
Discussion started by: rahulrathod
5 Replies
sv(8) System Manager's Manual sv(8)
NAME
sv - control and manage services monitored by runsv(8)
SYNOPSIS
sv [-v] [-w sec] command services
/etc/init.d/service [-w sec] command
DESCRIPTION
The sv program reports the current status and controls the state of services monitored by the runsv(8) supervisor.
services consists of one or more arguments, each argument naming a directory service used by runsv(8). If service doesn't start with a dot
or slash and doesn't end with a slash, it is searched in the default services directory /etc/service/, otherwise relative to the current
directory.
command is one of up, down, status, once, pause, cont, hup, alarm, interrupt, 1, 2, term, kill, or exit, or start, stop, restart, shutdown,
force-stop, force-reload, force-restart, force-shutdown.
The sv program can be sym-linked to /etc/init.d/ to provide an LSB init script interface. The service to be controlled then is specified
by the base name of the ``init script''.
COMMANDS
status Report the current status of the service, and the appendant log service if available, to standard output.
up If the service is not running, start it. If the service stops, restart it.
down If the service is running, send it the TERM signal, and the CONT signal. If ./run exits, start ./finish if it exists. After it
stops, do not restart service.
once If the service is not running, start it. Do not restart it if it stops.
pause cont hup alarm interrupt quit 1 2 term kill
If the service is running, send it the STOP, CONT, HUP, ALRM, INT, QUIT, USR1, USR2, TERM, or KILL signal respectively.
exit If the service is running, send it the TERM signal, and the CONT signal. Do not restart the service. If the service is down, and
no log service exists, runsv(8) exits. If the service is down and a log service exists, send the TERM signal to the log service.
If the log service is down, runsv(8) exits. This command is ignored if it is given to an appendant log service.
sv actually looks only at the first character of these commands.
Commands compatible to LSB init script actions
status Same as status.
start Same as up, but wait up to 7 seconds for the command to take effect. Then report the status or timeout. If the script ./check
exists in the service directory, sv runs this script to check whether the service is up and available; it's considered to be avail-
able if ./check exits with 0.
stop Same as down, but wait up to 7 seconds for the service to become down. Then report the status or timeout.
reload Same as hup, and additionally report the status afterwards.
restart
Send the commands term, cont, and up to the service, and wait up to 7 seconds for the service to restart. Then report the status or
timeout. If the script ./check exists in the service directory, sv runs this script to check whether the service is up and avail-
able again; it's considered to be available if ./check exits with 0.
shutdown
Same as exit, but wait up to 7 seconds for the runsv(8) process to terminate. Then report the status or timeout.
force-stop
Same as down, but wait up to 7 seconds for the service to become down. Then report the status, and on timeout send the service the
kill command.
force-reload
Send the service the term and cont commands, and wait up to 7 seconds for the service to restart. Then report the status, and on
timeout send the service the kill command.
force-restart
Send the service the term, cont and up commands, and wait up to 7 seconds for the service to restart. Then report the status, and
on timeout send the service the kill command. If the script ./check exists in the service directory, sv runs this script to check
whether the service is up and available again; it's considered to be available if ./check exits with 0.
force-shutdown
Same as exit, but wait up to 7 seconds for the runsv(8) process to terminate. Then report the status, and on timeout send the ser-
vice the kill command.
try-restart
if the service is running, send it the term and cont commands, and wait up to 7 seconds for the service to restart. Then report the
status or timeout.
Additional Commands
check Check for the service to be in the state that's been requested. Wait up to 7 seconds for the service to reach the requested state,
then report the status or timeout. If the requested state of the service is up, and the script ./check exists in the service direc-
tory, sv runs this script to check whether the service is up and running; it's considered to be up if ./check exits with 0.
OPTIONS
-v If the command is up, down, term, once, cont, or exit, then wait up to 7 seconds for the command to take effect. Then report the
status or timeout.
-w sec Override the default timeout of 7 seconds with sec seconds. This option implies -v.
ENVIRONMENT
SVDIR The environment variable $SVDIR overrides the default services directory /etc/service/.
SVWAIT The environment variable $SVWAIT overrides the default 7 seconds to wait for a command to take effect. It is overridden by the -w
option.
EXIT CODES
sv exits 0, if the command was successfully sent to all services, and, if it was told to wait, the command has taken effect to all ser-
vices.
For each service that caused an error (e.g. the directory is not controlled by a runsv(8) process, or sv timed out while waiting), sv
increases the exit code by one and exits non zero. The maximum is 99. sv exits 100 on error.
If sv is called with a base name other than sv: it exits 1 on timeout or trouble sending the command; if the command is status, it exits 3
if the service is down, and 4 if the status is unknown; it exits 2 on wrong usage, and 151 on error.
SEE ALSO
runsv(8), chpst(8), svlogd(8), runsvdir(8), runsvchdir(8), runit(8), runit-init(8)
http://smarden.org/runit/
AUTHOR
Gerrit Pape <pape@smarden.org>
sv(8)