exec is a functionality of an operating system that runs an executable file.
Questions tagged [exec]
53 questions
0
votes
1 answer
puppet variables set in exec environment not accessible elsewhere in the class
I'm trying to configure a logging figuration with log paths based on a check to see if that log file exists. However, the if statements always return true even though I know /var/log/hermes/hermes.log doesn't exist. I have tested the exec…
![](../../users/profiles/428444.webp)
Scott Edden
- 1
- 1
0
votes
1 answer
When use "exec 1>ok.log", how can I output the specified content to the screen within a shell script?
As follow, I only want the command echo "this is to stdout" output to my screen instead of to the file ok.log, how can I do?
I search for the usage of exec shell command, but without result, please advice me
[root@161 tmp]# bash --version
GNU…
![](../../users/profiles/310825.webp)
jython.li
- 84
- 2
- 10
0
votes
2 answers
How to direct errors from with a find exec command to a log file
Hi I have the following command that does yui optimizations and runs as a cron job. I want to log the output of the command to a log file.
find . -type d -exec bash -c "cd '{}' && pwd && java -jar /opt/yui/yui.jar -o '.css$:.css' *.css" \; >…
![](../../users/profiles/213315.webp)
remudada
- 57
- 8
0
votes
1 answer
Puppet EXEC: execute part of code only after another part is executed
I have the following puppet code:
exec { 'set mysql root password':
user => root,
path => "/usr/bin:/usr/sbin:/bin",
command => "/usr/bin/mysqladmin -u root password \'${root_pwd}\'",
onlyif => 'grep…
![](../../users/profiles/125889.webp)
Spaniard89
- 107
- 1
- 3
- 7
0
votes
1 answer
php-fpm does not work me exec or shell_exec
I have OpenBSD 5.6 and php-fpm, nginx.
Is chrooted by default on /var/www
I try:(test.php)
";
if( ini_get('safe_mode') ){
…
![](../../users/profiles/270843.webp)
laur
- 117
- 1
- 4
0
votes
2 answers
How to pass parameter for Exec from notify?
I've the following Puppet manifest:
# PHP Configuration
class php {
exec { "php5enmod $module":
path => "/usr/sbin",
command => "php5enmod $module",
}
file {'/etc/php5/conf.d/upload_limits.ini':
ensure => present,
owner =>…
![](../../users/profiles/130437.webp)
kenorb
- 5,943
- 1
- 44
- 53
0
votes
2 answers
Script out SQL Job Create Statement Without SSMS
Does anyone have an idea of how to generate the Create statement for a SQL Agent Job? I've looked everywhere, and I can't seem to find a search result that doesn't involve using SSMS and going through the Object Explorer. I've gone off and found…
![](../../users/profiles/226535.webp)
Black Dynamite
- 483
- 2
- 5
- 15
0
votes
1 answer
Strange behavour of which in a shell script launched as a forked process
So I have a java process that is doing some automation. One of the things it has to do is find the JDK home on random machines.
So I wrote a shell script to try and find the JDK home assuming that javac is on the path.
While testing this shell…
![](../../users/profiles/147023.webp)
Stephen Connolly
- 231
- 1
- 4
0
votes
0 answers
Executing a command as apache
This script keeps outputting a 1. and I cannot understand why.
I have also tried the above code without the nohup. I have the following line in my sudoers…
![](../../users/profiles/85585.webp)
Lord Loh.
- 1,049
- 3
- 15
- 24
0
votes
1 answer
Monit runs exec action too often
I've written a script which sends me an sms notification. I call with exec action in monit test. It works, but I'm getting overwhelmed by messages. Is there a way to suppress sending subsequent messages if check fails until it succeeds?
Here is the…
![](../../users/profiles/139298.webp)
Dmitry Vyal
- 109
- 2
0
votes
2 answers
Puppet: exec onlyif value is not equal
I have a script that really only needs to be run one time on a server, i.e. at deployment time, but figured it would be best to have Puppet manage it. The script remaps several legacy user id's that conflict with local system users.
The way I check…
![](../../users/profiles/30415.webp)
Banjer
- 3,854
- 11
- 40
- 47
0
votes
1 answer
Shell script Process PID logging and maintenance using exec
I am trying to launch a java process as a server and then might periodically need to restart/kill it at certain times. Since I use a shell script to launch java jvm(to build classpath), I thought of logging the shell script process id using $$ and…
![](../../users/profiles/75643.webp)
aditya
- 13
- 2
0
votes
1 answer
execute command on icmp request
I'd like to know how/if it is possible to get my linux (ubuntu) box to exec a command (script) on incoming icmp/ping (or other network events) requests?
Like e.g. playing a "ping" sound when being pinged, or playing an alert sound on specific source…
![](../../users/profiles/83647.webp)
nonchip
- 67
- 9
0
votes
4 answers
CGI error from PHP when running exec() on IIS
Windows Server 2003 x64
PHP 5.2
IIS 6.0
The program Ink2Png.exe is set with Everyone->Read and Execute permissions.
As does its dependency (microsoft.ink.dll)
PHP Safe Mode is off
exec() is passed [the full exe path], space, [full path to another…
![](../../users/profiles/63152.webp)
Patrick
- 99
- 1
- 5
0
votes
2 answers
Exclude pings from apache error logs (ran from PHP exec)
Now, for a number of reasons I need to ping several hosts on a regular basis for a dashboard display.
I use this PHP function to do it:
function PingHost($strIpAddr) {
exec(escapeshellcmd('ping -q -W 1 -c 1 '.$strIpAddr), $dataresult,…
![](../../users/profiles/64914.webp)
fooraide
- 125
- 4