Bash is the Bourne Again SHell, the successor to the classic Unix sh (shell).
2
votes
1answer
42 views
Supervisord unable to shutdown fcgi processes
I've managed to set up supervisord with fastcgi on a django project of mine, the problem is that when I make mi program stop, the server keeps running somehow, and my page keeps online.
Here is my ...
2
votes
1answer
57 views
IBMi bash upgrade
I am trying to install rvm in PASE on IBMi (v7.1) but it is failing because it states bash version 3.2.25 is required. Running bash --version via CALL QP2TERM states I am running the following ...
1
vote
1answer
29 views
Remote rename of a file on Samba share via Bash script
I'm running a Bash script under Cygwin, but this question applies more broadly.
I have a remote file: //someremoteserver/somefile.db
That "//" path is under Cygwin--it's essentially a UNC pathname ...
1
vote
1answer
103 views
Problems in monitoring file age with nagios (command substitution in filename)
In my current nagios installation I check for the existence of a remote backup through NRPE. In particular, my remote nrpe.cfg (on a Ubuntu 8.x) is:
...
1
vote
1answer
245 views
How can I kill and wait for background processes to finish in a shell script when I Ctrl+C it?
I'm trying to set up a shell script so that it runs background processes, and when I ctrl+C the shell script, it kills the children, then exits.
The best that I've managed to come up with is this. It ...
1
vote
1answer
122 views
export_bashrc() bash function to export .bashrc to a server
I am trying to write a bash function shown below.I am trying to scp my .bashrc to the target
machine.I want to do modify the following function in the below two ways.
1.I want to enter the password ...
1
vote
1answer
163 views
Redhat 5 Upgrade / Sphinx Search Init Startup Hangs
I recently upgrade a VM to Redhat 5 and moved Sphinx Search to that server. For some reason when
I try to start Sphinx, the startup script fails to push the searchd process to the
background. I ...
1
vote
1answer
230 views
pbs/Torque interactive jobs: bash trick to run command after launch
I'm using pbs interactive jobs in bash, launched using qsub -I, and I'd like to run some command after launch. After this command is run, I'd like to continue to use the interactive reservation as ...
1
vote
1answer
497 views
iotop for Linux kernel 2.6.18
So it has to come to my attention that iotop isn't availalbe for 2.6.18 since it's less than 2.6.20 and requires Python 2.6+. I've done some research and came across this article:
...
1
vote
1answer
619 views
run several bash scripts with expect code and leave them running
I have a bunch of several bash scripts that will perform some actions that require user input, therefore I'm using expect with it.
However, I need one to keep running. But if I use expect, the expect ...
0
votes
1answer
87 views
Linux- Permission denied?
I'm installing Neo4j server as a linux service, but when I install it, I get the following message:
/sbin/insserv: Permission denied
What is this? What should I do? I'm running everything with ...
0
votes
1answer
34 views
Close a SSH Session when it suspend
I start a ssh session on a remote host and execute a script on the remote host. The Script is an update script that change the remote IP.
Now my local bash script hanging on the line with this ...
0
votes
1answer
35 views
expect script works fine standalone not from bash script
I am running a expect script,which login to a server check if iptables running and return the log file of the status. There is a hostfile also given with server list and password, expect is being ...
0
votes
1answer
27 views
screen, expect and scripted detached interaction
Trying to write a bash script which will open a screen, start a python application, and interact with the python interaction as required when it is first started.
If not possible in screen, I would ...
0
votes
1answer
41 views
Deleting Files in a Zip Archive on Linux
I have a situation where I need to be able to run a script and delete specific files within a zip archive. Below is the general setup
/mnt/directory
/mnt/directory/Folder1
...
0
votes
1answer
141 views
smtp.gmail.com from bash gives “Error in certificate: Peer's certificate issuer is not recognized.”
I needed my script to email admin if there is a problem, and the company only uses Gmail. Following a few posts instructions I was able to set up mailx using a .mailrc file. there was first the error ...
0
votes
1answer
49 views
OSX terminal bash permission denied after GIT changed file permissions while cloning repo
I am a beginner at OSX/Unix command line.
I have a GIT repository that was created on my OSX computer. Recently I cloned the repo and went to run a bash script within the repo via ./BashFile.sh. This ...
0
votes
1answer
46 views
What could block the output of a command?
Sometimes I'll attempt a (2>&1) redirection and some/all of the resulting output appears to be silenced.
e.g.
wget -O- http://localhost/test.txt 2>&1
I would expect to see a merge of ...
0
votes
1answer
40 views
Formatting a disk and creating a partition using the maximum amount of cylinders through bash
Usually we would use parted or fdisk to create a new partition, but in my case I want to do this non-interactively in a script. An interactive fdisk session would look like this:
# fdisk /dev/sdb
...
0
votes
1answer
24 views
Bash reverse-search malfunctioning sometimes
When using the reverse-search feature in bash (Strg+R), typing some letters and pressing TAB, We encounter an error like in following example
(reverse-i-search)`sudo servi': ^Cdo service omd-0.54 ...
0
votes
1answer
23 views
Omnibus uniform Chef version install across platforms
So I'm looking for a uniform way to install chef on a number of different servers running different platforms. I know I can use the omnibus installer for this, but I also need a way to lock or ...
0
votes
1answer
40 views
Interfacing strace with Process Name instead of PID
How do I implement a wrapper script pstrace in bash that changees the interface of
[sudo] strace -c -p [PID]
to
[sudo] pstrace -c -p [PROCESS-NAME]
similar to how
killall [PROCESS-NAME]
is ...
0
votes
1answer
256 views
How do I correctly SSH port forward using LiveReload on Redhat?
Referencing this page:
http://feedback.livereload.com/knowledgebase/articles/86280-if-you-edit-files-directly-on-your-server
It says you can remotely port forward the LiveReload specific port of ...
0
votes
1answer
280 views
Create restricted user on Debian server
I want to create a user account for each of the key programs installed on my debian server. For example, for the following programs:
Tomcat Nginx Supervisor PostgreSQL
This seems to be recommended ...
0
votes
1answer
77 views
on suse11 executables are run using sh instead of bash. How to change this
On Suse 11 though the default shell is bash, when I run any executable shell like ./IsCurrentShell then this script is run using sh instead of bash. How can I make this behavior to change such that ...
0
votes
1answer
61 views
calling a variable in find regex
Is there a way to call a variable in the below manner?
in this case X=$(date --date=yesterday +%Y-%m-%d)
echo $X --> 2012-07-26
The below command works but even if the date is in 25 it considers. ...
0
votes
1answer
224 views
Cron task failing on specific job
On my server I am getting the following error when running one of my cron tasks:
CRON[9913]: (CRON) error (grandchild #9915 failed with exit status 127)
The server is running ...
2
votes
0answers
86 views
How do I download the avatar image from an Active Directory server?
I'm using the ldapsearch.exe binary that was installed along with an Oracle client. It took awhile to tease out the arguments that it wanted, but I'm able to successfully connect to AD and parse out ...
2
votes
0answers
185 views
Calculate average of every 5 samples with rrdtool or other languages
I want to make an average of 5 samples and calculate a single value:
Current output - I put resolution of 5 minutes but receive 5 samples:
$ rrdtool fetch file.rrd AVERAGE -r 300 --start 1200000000 ...
1
vote
0answers
79 views
Spanish Characters in Linux Server Bash Shell
I have a database that contains Spanish words in it. It contains words like sueño which have "special characters" in them. The MySQL database collation is set to utf-8-general-ci which supports ...
1
vote
0answers
125 views
Generating jmeter .jmx files with shell and variables
I've been trying to find a way to mass generate jmeter xml config files based on my template and some variables I could define somewhere.
Bash didn't work too well, I was trying while read line with ...
1
vote
0answers
166 views
Autocompletion, history and scrolling in Byobu
I am using an Ubuntu server with Byobu. For some reason, the tab key writes a tab instead of completing commands and paths. Top arrow writes ^[[A instead of the command history. Scrolling writes ^[[B. ...
1
vote
0answers
294 views
Running Hudson builds with a higher nice level
I want to run build jobs in Jenkins with minimal cpu usage. I've tried this:
Created the directory "jenkinsJdk".Jenkins is configured to use this dir as JDK "testJdk". A sample job uses "testJdk" ...
0
votes
0answers
15 views
schroot auto-mounting doesnt works?
I've been reading about schroot and trying to understand the parts in various tutorials that mention about auto mounting. For example check the section (and the parts after it) "Basic schroot ...
0
votes
0answers
22 views
Installing keys with .DEB packages silently fails
I'm trying to create a .DEB package which will install a number of certificates and keys onto a system.
To do this, i've gone through the standard package creation process, and thrown two files, ...
0
votes
0answers
33 views
How can I block all wordpress admin access on a server?
I administer a server with lot of wordpress installations.
Is there a way to block all admin-accounts with one script, or to add an extra password in the global apache configuration?
I would like to ...
0
votes
0answers
55 views
rsync script to rewrite suffix - BASH, awk, sed, perl?
trying to write up a script to put the suffix back.
heres what I have but can't get it to do anything :(
would like it to be name.date.suffix
rsync -zrlpoDtub --suffix=".`date +%Y%m%d%k%M%S`.~" ...
0
votes
0answers
23 views
How to remove openstack without reimaging
I would like to be able to remove all open-stack components and all config files that were installed without re-imaging the system. I can delete the files and folders manually, but system changes will ...
0
votes
0answers
29 views
init script not working on reboot
I'm trying to run a script on reboot or halt, the function stop should be called. I done
chkconfig --add scriptname ;
chkconfig --level 345 scriptname on ;
chkconfig --level 016 scriptname off ;
...
0
votes
0answers
144 views
readlink: illegal option — f
Recently the script was working fine, but from some days I'm receiving such message, while running the readlink -f "$0" command:
readlink: illegal option -- f
usage: readlink [-n] [file ...]
I was ...
0
votes
0answers
109 views
Different result with same grep conditions via ssh
Like in the subject I got different result from the same grep command.
The following command is run on a central server which query the other servers via ssh.
ssh root@$domain "grep `date +%Y/%m/%d` ...
0
votes
0answers
166 views
SELinux denies execute of script resulting in a complex looking custom policy
The heartbeat type polling tool nanny (part of Piranha / Linux Virtual Server / LVS / IPVS) is being denied access to my "sendprogram" scripts by SELinux. Setting the context alone is not sufficient. ...
0
votes
0answers
156 views
Unable to write files from CGI running under boa on linux with busybox
I am running the boa webserver on an IP camera with BusyBox. I have set up a ScriptAlias and can run CGI scripts. I can echo "who" to the page and it says I am running as root, but I cannot write ...
0
votes
0answers
86 views
Accessing PSN (process serial number) from script
I have a script which is getting called by Flash Builder, which I would like to access the arguments of. Unfortunately, Flash Builder appears to pass the arguments via PSN (ie. -psn_0_12345678). Is ...
0
votes
0answers
275 views
Permit www-data to run ONE svn hook (bash) as root
A quick overview to my structure:
/var/bin/ Dedicated server bash scripts to manage server
/var/svn/[domain.com]/ SVN repositories directory
/var/svn/hooks.d/ SVN hooks (each domain is symbolic ...
0
votes
0answers
93 views
Remote call script as administrator
I created a Windows XP bat script to modify etc/hosts file.
I want to share this script at other machine, then from another computer I want to invoke these script to modify hosts file at first ...
0
votes
0answers
137 views
scp in for loop for installing printers — connection refused
I could've sworn I was able to setup printers by:
setup first host with lpadmin
setup additional hosts with for loop: wherein
stop cups
copy printers.conf over
start cups
for host in ...
0
votes
0answers
509 views
ldap_delete issue: no global superior knowledge
I'm trying to remove all entries under a particular OU on an LDAP server. The command that I'm using is:
sudo slapcat -v -n 1 -a ...
0
votes
0answers
197 views
How to run script only if load balancer is NOT routing requests to it via bash script?
I have 4 cloud instances. First is a load balancer (LB), and then 2 instances with the identical setup holding the application code (APP1 & APP2). And finally, I have a database instance (DB).
...
-1
votes
0answers
8 views
Execute command with Jailkit
So I created a jail at /opt/jail using http://olivier.sessink.nl/jailkit/ - how can I execute a command inside the jail now and get the output as I can do with chroot ?
The simplest command I'd like ...