-1
votes
1answer
186 views

Cacti Export Tool Script [duplicate]

I'm looking for any script that possible to export graph of Cacti into CSV/text format. I have several interfaces in different devices, so I want to export those graph by using cron's job for sending ...
0
votes
4answers
330 views

Script runs on 50 servers. How can I ensure only one executes a particular step?

I have some work that needs to be done on 50+ servers. The first step is to checkout an updated version of some source code onto a shared directory (assume all have the shared drive mounted). The ...
0
votes
2answers
978 views

Good pratice to create script to start/stop/restart service?

I was wondering what is a good pratice to create a good script to start/stop/restart some service. I will try to make myself more clear, ok ? Nowadays, I do something like this: let's say I would like ...
1
vote
1answer
102 views

Script expression to get part of a string?

I'm using the bash shell in CentOS, version ... $ uname -a Linux mydomain.com 3.2.29-48.63.amzn1.x86_64 #1 SMP Sat Sep 15 01:43:12 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux In my shell script, I want ...
5
votes
4answers
434 views

Is there a chroot build script somewhere?

I am about to develop a little script to gather information for a chroot-jail. In my case this looks (at the first glance) pretty simple: The application has a clean rpm-install and did install ...
2
votes
2answers
41 views

Looking to list all files/dirs ignored by rsyncs exclude file

I have around 7 or 8 servers, which I rsync down to my local LAN each night. All of these rsync jobs use a common excludes.txt, to filter out files or directories I dont want mirroring. Now, the ...
-1
votes
2answers
538 views

linux script - find java process and restart it if it is more than 80% Mem High

I want to put in crontab a shell script that will monitor the java process and if it's the memory is more than 80% then I want to restart it. can any one help? Thanks!! Elad.
0
votes
1answer
840 views

llinux - replace subnet mask in ifcfg-eth0 with sed or awk

I have 30 linux servers that I need to change subnetmask. I want to use a simple script or a simple command to change the subnemt mask from 255.255.255.128 to 255.255.255.0 in ifcfg-eth0. can ...
1
vote
2answers
896 views

CentOS: E-mail notification of failed ssh login attempts

Under CentOS, I need a script that will run every 10 minutes and e-mail me if there are any new failed ssh login attempts in /var/log/secure.
0
votes
2answers
378 views

Need a bash script to replace static IP with a new IP address

I would like to have a bash script for Centos machine. I want the script to show me the current IP Address /subnet mask / Default GW. and give me option to enter a new IP Address /subnet Mask / ...
7
votes
2answers
7k views

Getting shell script to run as a daemon on CentOS?

EDIT: For some reason half of my post got truncated, not sure what happened. I will update soon and will post that it is updated here at the top. EDIT: I have updated the post again, sorry for the ...
0
votes
1answer
460 views

Centos LInux shell script execute 2 minutes after the server has been rebooted

I would like to have a simple shell script that will be executed 2 min after my server came up after reboot. I just want to have a service restarted. can anyone advice? Thanks.
5
votes
2answers
2k views

Tips for optimizing RHEL/CentOS kickstart workflow

I'm working in an environment that consists of CentOS systems located in multiple data centers and office locations. I've been using a reasonable kickstart with a solid post-install script, but want ...
3
votes
3answers
821 views

how to rename a remote file on linux with script

I would like to have a (bash) script to rename a file on multiple remote linux servers any idea how to do it? thanks.
0
votes
3answers
522 views

cron job script - the script does not work from the cron (or it does not start)

I created a script to do something (after I reduced it just to echo "IS FINALLY WORKING" for testing purpose). If I type #bash /var/www/html/somedir/script.sh it works ok. The problem is that I ...
2
votes
3answers
821 views

More efficient method to synchronize very large # of files

I have a large directory that needs to be synced from a local server to my web server and am looking for the most efficient method of doing this. This directory contains 113k files in 14k directories ...
0
votes
2answers
109 views

How To Generate A Report Of All Messages Triggering A Specific NDR

CENTOS 5.x | Sendmail Hello All, I hope this is a simple question. =) I need to generate a report summary of messages that triggered a specific DSN code. For example: Jan 11 07:43:34 ...
0
votes
1answer
220 views

Linux (CentOS) - Is there any (feasible) way to add a file write “hook”?

I have a mod_security log parsing script to load data into a mysql database which is then accessed by our Project Management System to display recent flaggings by the rulesets for our developers. The ...
0
votes
6answers
4k views

init.d script not working … but the command works if I execute it in the console

I have a command that is working fine if I executed it from the command line ... but when I put it in an init.d script it wont's start (well .. it starts but have a behavior different from that when ...
1
vote
3answers
1k views

mysql create database and user script

Question Rewritten: HOMEDIR="ftpuser" REMOTEIP="1.1.1.1" MYSQLPASS="password" Q1="DROP USER "$HOMEDIR"_shop;" Q2="DROP DATABASE "$HOMEDIR"_shop;" Q3="CREATE DATABASE IF NOT EXISTS "$HOMEDIR"_shop;" ...
0
votes
2answers
204 views

On CentOS 4.4, how can I diagnose “scriptlet failed” errors from rpm -e?

While uninstalling an RPM on CentOS 4.4, I see error: %preun(mypackage-1.0) scriptlet failed, exit status 1 How can I find out exactly what it's trying to run, so that I can poke around in the ...
1
vote
1answer
4k views

Managing network interfaces on RHEL/CentOS with GUI + scripting (system-config-network)

We have two load balanced CentOS 5.3 webservers that handle a decent number (~20) of individualized shopping websites. The end result being that we have to have a separate secure site per product, ...
2
votes
2answers
145 views

SED Find&Replace with “OR”

After a bit of googling / research on my own i haven't found a definitive answer, I'm looking to search the entire /var/www/html/ folder for occurances of "127.0.0.1" and replace them with a server ...