Tag Info

New answers tagged

1

Yes, it's about permission. But not related to Upstart. This is because in 'catalina.sh start', i.e. in the 'start' part, the real command is: ... -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \ org.apache.catalina.startup.Bootstrap "$@" start \ >> "$CATALINA_OUT" 2>&1 "&" Here the output log is fully assigned. While there is no ...


3

I'd recommend that you consider using logstash for this. It can consume text log files and pipe the log entries to a wide variety of other systems, including syslog. You may be able to hack something together using netcat or the like, but using a purpose-built tool like logstash is going to be far better in the long run. In addition to merely serving as a ...


2

Your best best would be to set up your local syslog server to read the files and send them to your remote location. I've used syslog-ng, rsyslog and nxlog extensively for this. A quick look at google shows that syslogd should be able to do the same.


0

Put the following at the top of your script: eval `ssh-agent` Your script should look like this: #!/bin/bash eval `ssh-agent` ssh-add /path/to/key ... ... Explanation The backticks around ssh-agent collect its output. eval collects that output, concatenates into into a single command, and then executes the command. Then you can use ssh-add to provide ...


1

Some differences on Bash 4.3.11: < [[ a < b ]]: lexicographical comparison [ a \< b ]: Same as above. \ required or else does redirection. Bash extension. = [[ ab = a? ]]: true, because it does pattern matching (* ? [ are magic). Does not glob expand to files in current directory. [ ab = a? ]: a? glob expands. So may be true or false ...


1

Using GNU Parallel it looks like this: parallel -j77 'cd {} && git checkout master && git pull' ::: */ It gives 77 workers. GNU Parallel is a general parallelizer and makes is easy to run jobs in parallel on the same machine or on multiple machines you have ssh access to. It can often replace a for loop. If you have 32 different jobs ...


2

You can use GNU parallel to do this task. From GNU parallel's home page, " A job can also be a command that reads from a pipe. GNU parallel can then split the input and pipe it into commands in parallel." There is excellent tutorial and this specific section addresses what exactly you have asked. Edit: Here is the command you can use. (Slightly modified ...


0

You have to take into account at least two cases - removing stopped container, which can be removed with a single command and removing running containers, where the container has to be stopped first before being deleted. In addition to this, in stead of using grep to find the container name, I would use the filter option of docker ps, that way you won't end ...


2

I was able to solve this issue through the following: export AWS_CONFIG_FILE="/root/.aws/config" export AWS_ACCESS_KEY_ID=XXXX export AWS_SECRET_ACCESS_KEY=YYYY


3

You can use xargs to do the job, for example (for repo in * do [ -d ${repo} ] && echo ${repo} done ) | xargs -I{} -P4 ./gitActions.sh {} The flag -P4 tells xargs to run up to 4 simultaneous process so you can play with the number of process you want/need. Then your gitActions.sh file should contain: #!/bin/bash repo=$1 cd $repo; git ...


0

You can actually create a ~/.ssh/config file to specify individual options (see man ssh for more options) for every host, eg: Host myserver HostName 127.0.0.1 User someuser IdentityFile ~/.ssh/some_id IdentitiesOnly yes Host otherserver.net User root Port 5010 After creating that file you may modify your ~/.dsh/machines_list ...



Top 50 recent answers are included