12-26-2012
Script to detect dynamic ip change and update to config file
Hi All,
I am newbie here and request your assistance.
I have a service running on public ip, but since I have a dynamic IP it keeps on changing and every time I need to manually get the new ip and add to the config file and restart the service. This has become bit time consuming.
Hence, I am looking for a script that can do the following action.
Detect IP address in ppp0 whenever it changes -> capture the new IP address and update that to my config file and save -> Restart my service.
Thanking you.
Regards
Shaan
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
currently it has the following:
bdumpN=`ll /home/apps/oracle/admin/DBprod/bdump/DBprod_j* | grep "$Cdate" | wc -l`
If I pass the DBname, I would not have to hardcode it in the script...
I can capture the database name by adding the following:
DBname=$1
The problem is, I have been unable... (2 Replies)
Discussion started by: mr_manny
2 Replies
2. UNIX and Linux Applications
Hi To All Genius out there,
We are running autosys application on solaris 10. In autosys we have a configuration file that contains an Autosys instance configuration data and is located on a NFS filer on which we have a read-only access.
Our Autosys environment is on a dual server... (0 Replies)
Discussion started by: whn_chips_r_dwn
0 Replies
3. Solaris
Hi To All Genius out there,
We are running autosys application on solaris 10. In autosys we have a configuration file that contains an Autosys instance configuration data and is located on a NFS filer on which we have a read-only access.
Our Autosys environment is on a dual server mode(Active... (0 Replies)
Discussion started by: whn_chips_r_dwn
0 Replies
4. Shell Programming and Scripting
Hi guys I'm very new to unix and I have to create an awk script that detects webpage addresses from a file/webpage and outputs how many times each webpage was detected.e.g. if my file was:
(Note: The symbol " was added to stop them being created into links)
"www.google.com"... (1 Reply)
Discussion started by: ROFL
1 Replies
5. Shell Programming and Scripting
Hi guys I'm very new to unix and I have to create an awk script that detects webpage addresses from a file/webpage and outputs how many times each webpage was detected.e.g. if my file was:
www.google.com
www.facebook.com
www.google.com
the output should be:
www.google.com x2... (2 Replies)
Discussion started by: ROFL
2 Replies
6. Shell Programming and Scripting
Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated.
script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made.
OS :Susi linux ver 10.3.
... (4 Replies)
Discussion started by: muraliinfy04
4 Replies
7. Linux
I have one issue with my existing code.Actually i want to write parameter's at the end of the section not begin of section.please find my code snapshots...
while read cfgfilename sectionname parameter
do
case "$cfgfilename" in
cfgfilename)
FILE=$HOME/config/$parameter
unset... (1 Reply)
Discussion started by: suryanarayan
1 Replies
8. Windows & DOS: Issues & Discussions
I want to allow windows update when ordinary users are logged on, I'm pretty sure that adjusting the permissions registry entry HEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/WindowsUpdate to allow acces to all domins users does the trick.
I already have a logon.bat that runs at... (0 Replies)
Discussion started by: barrydocks
0 Replies
9. Shell Programming and Scripting
Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Discussion started by: right_coaster
3 Replies
10. Shell Programming and Scripting
hi
I need to update the value in config.txt value using shell script
example:
lets say a value in config.txt file is as SEQUENCE=1
after some iteration as the loop ends , the SEQUENCE should get update in the config.txt file with a new value of SEQUENCE=2.
also , can anyone please help me... (7 Replies)
Discussion started by: ravidwivedi2288
7 Replies
LEARN ABOUT DEBIAN
kpasswdd
KPASSWDD(8) BSD System Manager's Manual KPASSWDD(8)
NAME
kpasswdd -- Kerberos 5 password changing server
SYNOPSIS
kpasswdd [--addresses=address] [--check-library=library] [--check-function=function] [-k kspec | --keytab=kspec] [-r realm | --realm=realm]
[-p string | --port=string] [--version] [--help]
DESCRIPTION
kpasswdd serves request for password changes. It listens on UDP port 464 (service kpasswd) and processes requests when they arrive. It
changes the database directly and should thus only run on the master KDC.
Supported options:
--addresses=address
For each till the argument is given, add the address to what kpasswdd should listen too.
--check-library=library
If your system has support for dynamic loading of shared libraries, you can use an external function to check password quality. This
option specifies which library to load.
--check-function=function
This is the function to call in the loaded library. The function should look like this:
const char * passwd_check(krb5_context context, krb5_principal principal, krb5_data *password)
context is an initialized context; principal is the one who tries to change passwords, and password is the new password. Note that
the password (in password->data) is not zero terminated.
-k kspec, --keytab=kspec
Keytab to get authentication key from.
-r realm, --realm=realm
Default realm.
-p string, --port=string
Port to listen on (default service kpasswd - 464).
DIAGNOSTICS
If an error occurs, the error message is returned to the user and/or logged to syslog.
BUGS
The default password quality checks are too basic.
SEE ALSO
kpasswd(1), kdc(8)
HEIMDAL
April 19, 1999 HEIMDAL