Questions tagged [conditional]
54 questions
1
vote
1 answer
apache if ie send some header
I want to set some headers just for MSIE using apache configuartion file. How can i set the condition for that ?
# better website experience for ie users
# && MSIE is just exmple. WRONG
Header set X-UA-Compatible…

Mohammad Hossein Fattahizadeh
- 471
- 1
- 9
- 27
1
vote
2 answers
Conditional `mount` in Linux: dev or nfs
I have a mount point — let it be /media/question — and two possible devices: a physical HDD and a remote NFS folder. Sometimes I plug the device in physically, in other cases I mount it via NFS.
Is there a way to specify both of them in fstab so…

kolypto
- 11,058
- 12
- 54
- 66
1
vote
1 answer
Ansible conditional with variables and wildcards
Been trying to add a conditional with a wildcard and an Ansible variable and getting an error message. The idea is to trigger the api request with the container name starts with "android-", this is a follow-up to a docker container creation…

Saptronic
- 13
- 1
- 4
1
vote
2 answers
Prevent OpenVPN systemd service from starting at home
Within my laptop PC, I set a systemd service that make a OpenVPN connection to my home, and let it automatically start on boot, so that I can access my home server anywhere.
The trouble is that when I'm home already, it still connects to VPN, and…

Leon
- 169
- 9
1
vote
0 answers
how to make a redirect conditional on nginx conf
I should make a conditional rediction in nginx.
I would like to do something like that.
$http_code = code from curl commande
if ( $http_code = 200 ){
"redirection to server 1"
}
else {
"redirection to server 2"
}
So can someone help me to find a way…

khaled
- 21
- 1
1
vote
2 answers
Bash script - check if a variable is located between 2 others variables?
In a Bash script I want to check if var1 is located between var2 and var3.
But I can't find how to do it.
Something like this.
var1=15
var2=10
var3=20
if [ "$var1" is located beetween "$var2" and "$var3" ]
then
echo "ok"
else
echo "not…

Maxime
- 69
- 7
0
votes
2 answers
Ansible Variable Definition to Choose import_playbook From Inventory File
I'm using Ansible (V2.8) to build two different server environments that happen to support Drupal. They are very similar in terms of the settings for the OS, RDBMS, gluster, memcached, etc. But very different with regards to the use of Drupal…

P Burke
- 183
- 3
- 12
0
votes
1 answer
Using Azure Conditional Access to control downloading from SharePoint/OneDrive
I'm trying to use Azure Conditional Access to control downloading from SharePoint/OneDrive, but i'm completely new to this.
I wish to be able to use OneDrive (the business app) AND to download/sync files from OneDrive online / Sharepoint via a…

Phil Newby
- 115
- 6
0
votes
1 answer
How to whitelist User Agent string?
I'm trying to whitelist a very specific User Agent string in Nginx. The below examples demonstrate how to whitelist general types of browsers (eg mozilla or chrome), but the string I want to whitelist has / and ( which breaks the nginx conf.
How to…

user421936
- 241
- 1
- 3
- 4
0
votes
1 answer
How can I script the shutdown of a host by a remote server when rsync completes and no users are logged in?
This is what I have so far. This script would run on a Network Services host that does things like DHCP etc... and in this instance should be waking and sleeping computers for backup.
#!/bin/bash
## This script exists to wake up the Digital Audio…

jerk
- 1
- 2
0
votes
1 answer
Install application inside docker container , only when it has not been installed before?
Is there a way to install any application inside docker container , only when it has not been installed before?
For example;
RUN apt-get install -y nginx
Will install nginx everytime on a new rebuild.
How would one check if nginx already exists? If…

Rubytastic
- 223
- 1
- 2
- 14
0
votes
1 answer
DNS Conditional forwarder returns NETBIOS instead of FQDN
Strange DNS problem for which I hope you can help.
Active Directory with NETBIOS name "Shortdomain" and as FQDN "verylongdomainname.lan". Domain controller DC01 behind firewall. IP: x.x.x.1
Customer site, connected over VPN. Customer has local DNS…

Gabrie
- 123
- 6
0
votes
1 answer
Nginx: security vs conditionals
I was reading around looking for some security steps that can be taken in Nginx to protect apps I'm serving using Nginx as a reverse proxy. I found this code which has some good things in it to protect sites, but it's full of conditionals and the…

Ryan Burnette
- 163
- 1
- 4
0
votes
3 answers
EXIM - Send local mail to Gateway First
My mail server is protected from spam by our Barracuda appliance. I'm trying to configure EXIM to forward ALL outbound messages to the Barracuda server first, including mail for local domains. Once the messages are scanned and allowed, the Barracuda…
0
votes
1 answer
Postfix conditional rules base on sending address
Email configuration on dev server: At the moment I have postfix configured to route all emails sent to itself. So if you try to send and email to any address say gareth@example.com it won't be delivered the that address, instead you would check the…

garethhallnz
- 111
- 2
- 4