Sponsored Content
Top Forums Shell Programming and Scripting Detecting a successfull FTP connection Post 84927 by linuxpenguin on Thursday 29th of September 2005 01:48:02 PM
Old 09-29-2005
y dont u ping

I think your method is robust enough.

alternatively, just use

ping yourserver -c 1 1>/dev/null 2>/dev/null
if [ $? -eq 0 ]
then
echo "server up"
else
echo "server down"
fi

This will show if 'yourserver' is running.
 

10 More Discussions You Might Find Interesting

1. IP Networking

FTP connection problem

We have moved our DNS and DHCP to Windows 2000 from BIND. Our FTP Server is running Solaris 2.6, users who receive an i.p. address from win2k DHCP receives a connection failed error when trying to FTP and users who have static i.p. address can FTP with no problems. Can anyone shed light as to... (11 Replies)
Discussion started by: cassy
11 Replies

2. Shell Programming and Scripting

Detecting data loss during FTP

Hi, How we can detect that there has been a data loss during FTP, throught Shell scripting? I have gone through FTP return codes, but, none indicate that there has been any data loss. Can we use FTP return code 226 as an indication that during file transfer there has been no data loss? If,... (4 Replies)
Discussion started by: sameerbo
4 Replies

3. Cybersecurity

FTP Connection

I just started a new job and inherited a Fedora core 3 server. I wanted to open the ftp ports and I wanted to verify this code before I mess things up. From my reading the two lines below should allow ftp access can anyone confirm my attempt. iptables -A INPUT -p tcp - sport 21 -m state - state... (0 Replies)
Discussion started by: mungaz
0 Replies

4. Solaris

solaris 10 isnt detecting my internet connection

I installed solaris 10 on my desktop pc, however it does not detect my internet connection. IM also running redhad and that detects it automatically, so i guess i have to go in manually and change something. Im new to all this however and i have no idea how to proceed. (5 Replies)
Discussion started by: stride6
5 Replies

5. SCO

ftp connection

I have problem with ftp connection on SCO UNIX 5.0.7, it is work slowly. How I can make accelerate. (6 Replies)
Discussion started by: draganmi
6 Replies

6. UNIX for Dummies Questions & Answers

FTP Connection

Hi, Anyone encounter whereby when you FTP from an Unix server (Solaris 8) to another server (Window Server 2003), you tend to wait a long while when you do a "ls" and you get a timeout after that. However, when you FTP again and do a "ls", the result of "ls" shown immediately. All connection are... (5 Replies)
Discussion started by: ahlude
5 Replies

7. Shell Programming and Scripting

FTP connection problem

I am getting the error in this command when i am pitting it in shell script ftp -nvi jcmpcor1.abc.com >/work/test98.dat << EOD error:- invalid command. but when i am writting it from outside it work fine. (7 Replies)
Discussion started by: ravi214u
7 Replies

8. HP-UX

ftp first connection closed

Hi, Have anyone seen this problem, there is one remote side where their ftp connection to our server will always fail with connection closed by remote host and the second connection will be working. is this an OS issue or network issue? Thanks Robert (4 Replies)
Discussion started by: robertngo
4 Replies

9. Solaris

Solaris 10 ftp connection problem (connection refused, connection timed out)

Hi everyone, I am hoping anyone of you could help me in this weird problem we have in 1 of our Solaris 10 servers. Lately, we have been having some ftp problems in this server. Though it can ping any server within the network, it seems that it can only ftp to a select few. For most servers, the... (4 Replies)
Discussion started by: labdakos
4 Replies

10. Debian

ftp connection refused

I have two computers running Debian 6.0 and one running Solaris 2.6 on a private network. The Debian computers can ftp to the Solaris computer but if a Debian computer is the destination the ftp connection is refused. I assume this is some security feature of Debian. What can I do to allow... (2 Replies)
Discussion started by: snorkack59
2 Replies
darkice.cfg(5)						    DarkIce live audio streamer 					    darkice.cfg(5)

NAME
darkice.cfg - configuration file for darkice DESCRIPTION
The configuration file consists of sections, with key = value pairs separated with spaces and/or tabs inside each secion: [section1] # this is a whole line comment key = value an ugly key name = long value # this end is a comment too [section2] # this is a whole line comment in section 2 key = value an ugly key name = long value # this end is a comment too A proper DarkIce configuration file contains the following sections: [general] [input] [icecast-0] ... [icecast-7] [icecast2-0] ... [icecast2-7] [shoutcast-0] ... [shoutcast-7] [file-0] ... [file-7] The order of the sections is not important. Sections [general] and [input] are required, and at least one of [icecast-x], [icecast2-x], [shoutcast-x] or [file-x] is needed. In particular, the following sections and values are recognized: [general] This section describes general operational parameters (required). Required values: duration Time for DarkIce to run, in seconds. If 0, run forever. bufferSecs Data read from the sound card is buffered before sent to the encoder. Each buffer will be able to hold this many seconds of samples. Optional values: reconnect Try to reconnect to the server(s) if the connection is broken during streaming, "yes" or "no". (optional parameter, defaults to "yes") realtime Use POSIX realtime scheduling, "yes" or "no". (optional parameter, defaults to "yes") [input] This section describes the input (required). Required values: device Specify the device to record from, which can be an OSS DSP device, an ALSA source or you can use Jack audio. - OSS DSP audio device to record from (e.g. /dev/dsp) - ALSA DSP device name (e.g. hwplug:0,0) - the string 'jack', to have an unconnected Jack port, or 'jack_auto' to automatically make Jack connect to the first source. sampleRate The sample rate to record with, samples per second (e.g. 44100 for 44.1kHz CD-quality audio, 22050 for 22kHz or 11025 for 11kHz) bitsPerSample Number of bits to use for each sample (e.g. 8 bits or 16 bits) channel Number of channels to record (e.g. 1 for mono, 2 for stereo) jackClientName The name of the jack input channel created by darkice if device=jack is specified. [icecast-x] This section describes an output to an IceCast 1.3.x server or Darwin Streaming Server , while encoding with a lame encoder. There may be at most 8 outputs, numbered from 0 ... 7. The number is included in the section name (e.g. [icecast-0] ... [icecast-7]). The stream will be reachable at http://<server>:<port>/<mountPoint> Required values: bitrateMode The bit rate mode of the encoding, either "cbr", "abr" or "vbr", standing for constant bit rate, average bit rate and variable bit respectively. Use the bitrate and/or quality values to specify details of the appropriate bit rate mode. bitrate Bit rate to encode to in kBits / sec (e.g. 96). Only used when cbr or abr bit rate modes are specified. quality The quality of encoding a value between 0.0 .. 1.0 (e.g. 0.8), with 1.0 being the highest quality. Use a value greater than 0.0. Only used when cbr or vbr bit rate modes are specified. server The IceCast server's name (e.g. yp.yourserver.com) port The port to connect to the IceCast server (e.g. 8000) password The password to use to connect to the IceCast server mountPoint Mount point for the stream on the server Optional values: sampleRate The sample rate of the encoded mp3 output. If not specified, defaults to the value of the input sample rate. channel Number of channels for the mp3 output (e.g. 1 for mono, 2 for stereo). If not specified, defaults to the value of the input sample rate. name Name of the stream description Description of the stream url Url related to the stream genre Genre of the stream public "yes" or "no", wether the stream is public remoteDumpFile The file the IceCast server should dump the contents of this stream on its side. localDumpFile Dump the same mp3 data sent to the IceCast server to this local file. fileAddDate "yes" or "no" if you want to automaticaly insert a date string in the localDumpFile name before its extension or at the end of file name if no extension present fileDateFormat The date format to use for appending the date to the dump file name. Defaults to "[%m-%d-%Y-%H-%M-%S]". All format strings accept- able by strftime() can be used, see the strftime man page for details. Only applicable is fileAddDate is "true". lowpass Lowpass filter setting for the lame encoder, in Hz. Frequencies above the specified value will be cut. If not set or set to 0, the encoder's default behaviour is used. If set to -1, the filter is disabled. highpass Highpass filter setting for the lame encoder, in Hz. Frequencies below the specified value will be cut. If not set or set to 0, the encoder's default behaviour is used. If set to -1, the filter is disabled. [icecast2-x] This section describes an output to an IceCast2 server, while encoding with the ogg vobis encoder. There may be at most 8 outputs, num- bered from 0 ... 7. The number is included in the section name (e.g. [icecast2-0] ... [icecast2-7]). The stream will be reachable at http://<server>:<port>/<mountPoint> DarkIce supports both fixed bitrate and variable bitrate vorbis streams. When using fixed bitrate, specify the bitrate using the bitrate field. When using variable bitrate, specify the quality of the stream by the quality field, which is a value between 0.0 and 1.0. Required values: format Format of the stream sent to the IceCast2 server. Supported formats are 'vorbis', 'mp3', 'mp2', 'aac' and 'aacp'. bitrateMode The bit rate mode of the encoding, either "cbr", "abr" or "vbr", standing for constant bit rate, average bit rate and variable bit respectively. Use the bitrate and/or quality values to specify details of the appropriate bit rate mode. bitrate Bit rate to encode to in kBits / sec (e.g. 96). Only used when cbr or abr bit rate modes are specified. quality The quality of encoding a value between 0.0 .. 1.0 (e.g. 0.8), with 1.0 being the highest quality. Use a value greater than 0.0. Only used when vbr bit rate mode is specified for Ogg Vorbis format, or in vbr and abr modes for mp3 and mp2 format. server The IceCast2 server's name (e.g. yp.yourserver.com) port The port to connect to the IceCast server (e.g. 8000) password The password to use to connect to the IceCast2 server mountPoint Mount point for the stream on the server Optional values: sampleRate The sample rate of the encoded output. If not specified, defaults to the value of the input sample rate. channel Number of channels for the output (e.g. 1 for mono, 2 for stereo). If not specified, defaults to the value of the input sample rate. Different channels for input and output are only supported for mp3, but not for Ogg Vorbis. maxBitrate The maximum bitrate of the stream. Only used when in cbr mode and in Ogg Vorbis format. name Name of the stream description Description of the stream url Url related to the stream genre Genre of the stream public "yes" or "no", wether the stream is public localDumpFile Dump the same Ogg Vorbis data sent to the IceCast2 server to this local file. fileAddDate "yes" or "no" if you want to automaticaly insert a date string in the localDumpFile name before its extension or at the end of file name if no extension present fileDateFormat The date format to use for appending the date to the dump file name. Defaults to "[%m-%d-%Y-%H-%M-%S]". All format strings accept- able by strftime() can be used, see the strftime man page for details. Only applicable is fileAddDate is "true". lowpass Lowpass filter setting for the lame encoder, in Hz. Frequencies above the specified value will be cut. If not set or set to 0, the encoder's default behaviour is used. If set to -1, the filter is disabled. Only has effect if the mp3 or mp2 format is used. highpass Highpass filter setting for the lame encoder, in Hz. Frequencies below the specified value will be cut. If not set or set to 0, the encoder's default behaviour is used. If set to -1, the filter is disabled. Only has effect if the mp3 or mp2 format is used. [shoutcast-x] This section describes an output to a ShoutCast server, while encoding with a lame encoder. There may be at most 8 outputs, numbered from 0 ... 7. The number is included in the section name (e.g. [shoutcast-0] ... [shoutcast-7]). The stream will be reachable at http://<server>:<port-1>/ Required values: bitrateMode The bit rate mode of the encoding, either "cbr", "abr" or "vbr", standing for constant bit rate, average bit rate and variable bit respectively. Use the bitrate and/or quality values to specify details of the appropriate bit rate mode. bitrate Bit rate to encode to in kBits / sec (e.g. 96). Only used when cbr or abr bit rate modes are specified. quality The quality of encoding a value between 0.0 .. 1.0 (e.g. 0.8), with 1.0 being the highest quality. Use a value greater than 0.0. Only used when cbr or vbr bit rate modes are specified. server The ShoutCast server's name (e.g. yp.yourserver.com) port The source port to connect to the ShoutCast server (e.g. 8001) password The password to use to connect to the ShoutCast server Optional values: mountPoint Mount point for the stream on the server. Only works on Darwin Streaming Server, the original Shoutcast server does not support mount points sampleRate The sample rate of the encoded mp3 output. If not specified, defaults to the value of the input sample rate. channel Number of channels for the mp3 output (e.g. 1 for mono, 2 for stereo). If not specified, defaults to the value of the input sample rate. name Name of the stream url Url related to the stream genre Genre of the stream public "yes" or "no", wether the stream is public irc IRC information related to the stream aim AIM information related to the stream icq ICQ information related to the stream lowpass Lowpass filter setting for the lame encoder, in Hz. Frequencies above the specified value will be cut. If not set or set to 0, the encoder's default behaviour is used. If set to -1, the filter is disabled. highpass Highpass filter setting for the lame encoder, in Hz. Frequencies below the specified value will be cut. If not set or set to 0, the encoder's default behaviour is used. If set to -1, the filter is disabled. localDumpFile Dump the same mp3 data sent to the ShoutCast server to this local file. fileAddDate "yes" or "no" if you want to automaticaly insert a date string in the localDumpFile name before its extension or at the end of file name if no extension present fileDateFormat The date format to use for appending the date to the dump file name. Defaults to "[%m-%d-%Y-%H-%M-%S]". All format strings accept- able by strftime() can be used, see the strftime man page for details. Only applicable is fileAddDate is "true". [file-x] This section describes an output to a local file in either Ogg Vorbis or mp3 format. There may be at most 8 outputs, numbered from 0 ... 7. The number is included in the section name (e.g. [file-0] ... [file-7]). Required values: format Format to encode in. Must be either 'mp3', 'mp2', 'vorbis', 'aac' or 'aacp'. bitrateMode The bit rate mode of the encoding, either "cbr", "abr" or "vbr", standing for constant bit rate, average bit rate and variable bit respectively. Use the bitrate and/or quality values to specify details of the appropriate bit rate mode. bitrate Bit rate to encode to in kBits / sec (e.g. 96). Only used when cbr or abr bit rate modes are specified. quality The quality of encoding a value between 0.0 .. 1.0 (e.g. 0.8), with 1.0 being the highest quality. Use a value greater than 0.0. Only used when cbr or vbr bit rate modes are specified. fileName The name of the local file to save the encoded data into. Optional values: sampleRate The sample rate of the encoded mp3 output. If not specified, defaults to the value of the input sample rate. Only used if the out- put format is mp3. lowpass Lowpass filter setting for the lame encoder, in Hz. Frequencies above the specified value will be cut. If not set or set to 0, the encoder's default behaviour is used. If set to -1, the filter is disabled. Only used if the output format is mp3. highpass Highpass filter setting for the lame encoder, in Hz. Frequencies below the specified value will be cut. If not set or set to 0, the encoder's default behaviour is used. If set to -1, the filter is disabled. Only used if the output format is mp3. A sample configuration file follows. This file makes DarkIce stream for 1 minute (60 seconds) from the audio device /dev/dsp at 22.05kHz, 16 bit stereo. It will build up a connection to the IceCast server yp.yourserver.com on port 8000 with the password "hackme". The stream will be encoded to 96 kb/s mp3 with quality 0.8, and will be reachable at http://yp.yourserver.com:8000/live96 to mp3 players. The encod- ing session will be stored by IceCast in the file /tmp/server-dump.mp3 on the server side, and also by DarkIce in the file /tmp/encoder- dump.mp3 on the encoder side. [general] duration = 60 bufferSecs = 5 [input] device = /dev/dsp sampleRate = 22050 bitsPerSample = 16 channel = 2 [icecast-0] bitrateMode = cbr bitrate = 96 quality = 0.8 server = yp.yourserver.com port = 8000 password = hackme mountPoint = live96 name = DarkIce trial description = This is only a trial url = http://www.yourserver.com genre = live public = no remoteDumpFile = /tmp/server-dump.mp3 localDumpFile = /tmp/encoder-dump.mp3 fileAddDate = no The following sample configuration file simply encodes the 16 bit stereo 44.1 kHz sound card input into Ogg Vorbis at average bit rate 96 kb/s for 60 seconds, and saves it in the local file at /tmp/save.ogg. [general] duration = 60 bufferSecs = 5 [input] device = /dev/dsp sampleRate = 44100 bitsPerSample = 16 channel = 2 [file-0] format = vorbis bitrateMode = abr bitrate = 96 fileName = /tmp/save.ogg A bit more complicated sample follows. This one makes DarkIce stream for 1 hour (3600 seconds) from the audio device /dev/dsp at 44.1kHz, 16 bit stereo. It will build up a connection to an IceCast server yp.your-ice-server.com on port 8000 with the password "ice-hackme". The sound for this stream will be cut at 10500 Hz from above. The stream will be encoded to average bit rate 96 kb/s mp3 and resampled to 22.05kHz and 1 channel (mono). The stream will be reachable at http://yp.your-ice-server.com:8000/live96 to mp3 players. The encoding session will be stored by IceCast in the file /tmp/live96.mp3 on the server side. It will also connect to a ShoutCast server at yp.your-shout-server.com on port 8001 with the password "shout-hackme" This stream will be encoded to constant bit rate 128 kb/s mp3 with quality 0.8, and will be reachable at http://yp.your-shout-server.com:8000 to mp3 players. [general] duration = 3600 bufferSecs = 5 [input] device = /dev/dsp sampleRate = 22050 bitsPerSample = 16 channel = 2 [icecast-0] sampleRate = 22050 channel = 1 bitrateMode = abr bitrate = 96 lowpass = 10500 server = yp.your-ice-server.com port = 8000 password = ice-hackme mountPoint = live96 name = DarkIce trial description = This is only a trial url = http://www.yourserver.com genre = live public = yes remoteDumpFile = /tmp/live96.mp3 [shoutcast-0] bitrateMode = cbr bitrate = 128 quality = 0.8 server = yp.your-shout-server.com port = 8001 password = shout-hackme name = DarkIce trial url = http://www.yourserver.com genre = live public = yes irc = irc.yourserver.com aim = aim here icq = I see you too BUGS
Lots of bugs. SEE ALSO
darkice(1) AUTHOR
Akos Maroy <darkeye@tyrell.hu> LINKS
Project homepage: http://code.google.com/p/darkice/ IceCast homepage: http://www.icecast.org/ ShoutCast homepage: http://www.shoutcast.com/ Lame homepage: http://www.mp3dev.org/mp3/ Ogg Vorbis homepage: http://www.xiph.org/ogg/vorbis/ DarkIce February 25, 2007 darkice.cfg(5)
All times are GMT -4. The time now is 09:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy