The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
23 views

Puppet and windowsfeature - Boolean Error

I'm new to Puppet Enterprise, but trying to learn how to deploy custom class files to Windows servers. I am attempting to use the opentable/windowsfeature module, but I'm getting an error when my ...
2
votes
1answer
407 views

salt stack: use state jinja variables in template

What I'd like to do is generate multiple configuration files for each openvpn user. I have the IP address and additional configuration in pillar. For example: openvpn: - user1: ip: 1.2.3.4 ...
1
vote
1answer
48 views

A way to pass / add addtional variables to URL in Windows Server 2008 acting as DHCP and DNS server?

We have a Windows 2008 SP2 server running as our DHCP and DNS server with IIS7 installed, every website request in the office goes through this server. Is there a way for us to add or to pass ...
0
votes
1answer
194 views

Puppet variables, defaults, merging and a template

During the task of writing a module, I found out that I have a huge amount of configurable parts. To better organize the module (for the sake of read- and maintainability), I have chosen to split ...
0
votes
1answer
167 views

Using Apache variable

I'm trying to use Apache's OpenID authentication module. According to this page, I should be able to use the REMOTE_USER Apache variable to identify the user. I'd like to pass this as a header to an ...
0
votes
1answer
91 views

Nginx using mysql result as variable to be used in headers more module

Without going into too much detail we have a requirement for the following: a) Query a simple single column, single row result from mysql. b) Use this variable as part of a more headers module, ...
0
votes
1answer
58 views

DBVis SQL Query - Using Date Variables

Firstly it's been a very long time since I did any SQL and even then it wasn't at a high level. I have created a SQL query which works but I want it so the date range changes automatically, for ...
0
votes
1answer
244 views

Postfix using a variable to specify home_mailbox path

At my server I would like to change the mail path instead of using the default user home directory for e-mail. The new home_mailbox path is now eg. '/home/mail/username'.. Now I need to set this path ...
0
votes
1answer
48 views

Query Sring - Variable redirection

I need help on this query string: I am using IIS 8 and I have this URL: http://automotive.ooplinks.com/index.php?route=product/search&filter_tag=westin *I would like to redirect the variable ...
0
votes
1answer
301 views

Centreon (Nagios) setting a host macro (variable)

EDIT2: Got it working - There was an unrelated problem that meant even though I was tinkering with the 'faulty' host definition, the revised check was not being run so I was always seeing the original ...
3
votes
1answer
230 views

Building up puppet variable based on conditions

So I'm getting adjusted to the immutable variables in puppet, now looking for some advice, or clarification to whether I'm already on the right track. I have a directory I'd like to sync, but ...
1
vote
2answers
441 views

Puppet generating variables inside script

I'm migrating a set of bash scripts that deploy a server to Puppet. Almost all of the functionality has been moved into Puppet, but I can't see how to migrate one bit of the bash script that does the ...
1
vote
2answers
2k views

Get ip address and set as variable bash shell script [duplicate]

I am trying to write a bash script to configure an app (unattended install). All I need to do is this. I need to get the IP address for the server and set it as a variable. I am writing this script to ...
0
votes
1answer
2k views

Get a URL with variables via Linux Command Line

Sorry if this seems to be a very simple command, but I have been searching for hours without any solutions and exhausted my very limited knowledge of Linux. :-) I need to use some command to process ...
0
votes
1answer
996 views

nginx httpMapModule regex variables

The HttpMapModule documentation states that: Since 1.0.4, case insensitive regular expressions can be used by prefixing the pattern with ~*. And gives the example: map $uri $myvalue { /aa ...
0
votes
1answer
85 views

Custom Variables in Apache Config

I currently have the following line in my Apache config (to exclude some top-level folders from a mod_rewrite rule): RewriteCond $1 !^(folder1|folder2|folder3|folder4|folder5)/ I would now like to ...
1
vote
3answers
502 views

error while executing bash script -> command not found

i made this script here, and get the error IA-exporto.sh: 13: wget: not found i tried changing the " by ` and mixed all together and rearranged, but it just won't do.. #!/bin/bash ...
0
votes
1answer
151 views

Escaping special characters while sourcing file in bash

I'v written a script that sources a bash shell fragment. The shell fragment is supposed to be a kind of configuration file, basically it's a bunch of bash variable. The issue here is when some of ...
0
votes
1answer
1k views

Passing an empty string as a commandline argument using a bash variable to a command

I have a daemon that can be run manually from a bash shell like this: daemon-binary --name some-name --separator '' /path/to/file The command-line options for this daemon should be configured in ...
0
votes
2answers
106 views

Variable inside bash's while loop never changed

Why does the following code always outputs "0"? #!/bin/bash RETVAL=0 echo -e '1\n2' | while read number; do RETVAL=1 done echo $RETVAL
2
votes
2answers
514 views

Get filename for puppet template

I have a file that I'd like to reuse for a few different purposes. The file is 90% the same across uses, just slight differences. I'd rather not replicate the content across multiple files in puppet, ...
1
vote
3answers
263 views

Apache mod_rewrite, multiple variables

I'm struggling a bit with mod_rewrite and replacing multiple variables with regexes. I'm trying to rewrite the following: www.mysite.com/avatars/funny/1 into: ...
6
votes
2answers
1k views

httpd.conf variables : What is the difference between ${var} and %{var}?

What is the difference between ${var} and %{var} in httpd.conf? How and when would one use ${} and %{}? http://httpd.apache.org/docs/2.4/configuring.html mentions : The values of variables ...
2
votes
2answers
1k views

exported variable not persisted after script execution

I'm facing a wierd issue. I've a vm with solaris 11, and trying to write some bash scripts. if, on the shell, I type : export TEST=aaa and subsequently run: set I correctly see a new ...
3
votes
2answers
1k views

How to call a puppet filetemplate twice with different parameters without using define?

i try to create two different files with one template, because they only diff by one line. file { "/tmp/bootstrap-raid.sh": content => template("pxe/bootstrap.sh.erb"), } file { ...
-1
votes
4answers
242 views

exporting variable globally

I can save the IP address of the current server to a variable and echo it out. # myvar=$(/sbin/ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}') # echo $myvar ...
2
votes
1answer
1k views

Dos Batch File Help: Storing %%c variable from FOR loop [Resolved]

It's been a while since i've had to write a batch file, and i'm having trouble with the following: @echo off SETLOCAL ENABLEDELAYEDEXPANSION for /f %%a in ('dir f:\*mssql* /ad/b') do ( for /f %%b ...
2
votes
3answers
2k views

How to set variables with basenode (in nodes.pp)?

I'm trying Puppet and it seems to be good. My question is very easy but I can't answer. I have a file "node.pp" : node basenode { include "dns" # include "ntp" } node ...
0
votes
2answers
918 views

bash whiptail variable parameters

I'm really pulling my hair out on this one. I just started with some bash scripting and I'm trying to create a simple script that uses some dialogs to give me a fast way to do a svn checkout. It's ...
1
vote
3answers
220 views

Bash Script, CD Into A Directory With A Dynamic Name

I am writing a bash script and need to cd into a directory, but the directory name is somewhat dynamic. It always begins with package-{then dynamic version}. How do I script this in bash? cd package- ...
0
votes
1answer
504 views

Event log - attaching to some event task which will run a program. Can I pass to this program event params?

I would like to run a program only when a specific ASP.NET event occurs in the event-log. Is there any chance that it will get passed the event details when it is triggered?
5
votes
3answers
9k views

bash: variable loses value at end of while read loop

I have a problem in one of my shell scripts. Asked a few colleagues, but they all just shake their heads (after some scratching), so I've come here for an answer. According to my understanding the ...
0
votes
1answer
200 views

Install cmd script to set user environment variables from file

Each line in input file.txt has two values separated by a space. Currently using: for /F "tokens=1,2" %%i in (file.txt) do call :setvars %%i %%j :setvars set %1=%2 set %3=%4 set ...
2
votes
4answers
718 views

Placement of Variables in Puppet module

I've got a puppet module to setup several Gigaspaces PU's. Each of these have quite a few variables to be placed within the configuration file templates. We're also using several different ...
2
votes
3answers
510 views

Passing variables problem - Bash

I have a following problem: #!/bin/bash NUM=`cat accounts | wc -l`; for i in {1..$NUM} do account=`awk "NR==$i" accounts`; echo -e "\nAccount: $account\n"; sudo ./backup_maildir $account; ...
0
votes
1answer
799 views

Howto get exit code of a script started in screen session

I am currently creating a backup script which uses screen to start a backup job with rsync inside a screen session. The backup jobs are started as follows. screen -dmS backup /usr/bin/rsync ... As ...
0
votes
2answers
179 views

Store product data in session variable or access db every time?

I have my database storing lots of information about products (year, name, release_date, volume, etc. etc.). I currently load all of the products once and store them in a session variable - right now ...
2
votes
3answers
4k views

control a bash script with variables from an external file

I would like to control a bash script like this: #!/bin/sh USER1=_parsefromfile_ HOST1=_parsefromfile_ PW1=_parsefromfile_ USER2=_parsefromfile_ HOST2=_parsefromfile_ PW2=_parsefromfile_ imapsync \ ...
0
votes
1answer
178 views

configure IIS7 (forwarding web server) to insert a special header

How can I configure IIS7 (which is acting as a forwarding web server to another server) to insert a special HTTP request header before forwarding. I want this request header to have a custom name and ...
0
votes
3answers
273 views

how i can read file and store its containt in variable?

I want to store number in file for example file number.txt contain 3242 I want to real this file and store its contant in variable for example variable number_var = number.txt so that number_var = ...
0
votes
1answer
175 views

Limits on Windows environment variable nesting?

So, is there a limit to how deeply environment variables can be nested in Windows? I do a lot of development work and I'm trying to set up my development environment vars, and a lot of them nest off ...
4
votes
3answers
5k views

Why is PHP $_REQUEST array empty?

I installed nginx on Ubuntu Hardy and immediately realized that the PHP scripts were getting empty request arrays, ie whether GET or POST nothing was coming through, even the $_REQUEST array was ...
0
votes
1answer
159 views

Apache - Configuraion - Getting path inside relative Directory tag

i have gitweb configuration for apache: #/etc/apache2/conf.d/gitweb RewriteEngine on RewriteRule ^/\~([a-z]*\.[a-z]*)/gitweb/([a-zA-Z0-9_\-]+\.git)/?(\?.*)?$ /cgi-bin/gitweb.cgi/$1 [L,PT] ...
2
votes
1answer
1k views

How to use grep commend with variable

How can i use grep commend with variable ? I stored ' Feb 1 ' (future it will be changeable) to variable 'date'. Now i want to grep this variable 'date', How can i do this ?
4
votes
1answer
12k views

Puppet: Referencing variables from a define in a template

I have the following class and definition in puppet: $certDirectory = "/var/lib/ssl/certs" class openssl { package { "openssl": ensure => latest } file { "openssl": path => ...
1
vote
3answers
9k views

Apache2 - mod_rewrite : RequestHeader and environment variables

I try to get the value of the request parameter "authorization" and to store it in the header "Authorization" of the request. The first rewrite rule works fine. In the second rewrite rule the value ...