[[ ]] c'est mieux que [ ]

darcs-hash:20080106222221-af139-f6372d6eda53c94395fb788058ad73f6798a7f91.gz
This commit is contained in:
Jeremie Dimino 2008-01-06 23:22:21 +01:00
parent 34b7f27d34
commit 37bac59749
2 changed files with 4 additions and 4 deletions

View file

@ -1,9 +1,9 @@
#!/bin/sh
#!/bin/bash
VPN_NAME=ovh
PID_FILE=/var/run/openvpn.${VPN_NAME}.pid
if [ ! -f $PID_FILE -o ! -d /proc/$(< $PID_FILE) ] && ! fping -q ovh.adm.crans.org; then
if [[ ! -f $PID_FILE || ! -d /proc/$(< $PID_FILE) ]] && ! fping -q ovh.adm.crans.org; then
if fping -q ovh.crans.org; then
if /etc/init.d/openvpn start ${VPN_NAME} > /dev/null; then
echo 'Lancement du tunnel vers OVH reussi !'

View file

@ -1,9 +1,9 @@
#!/bin/sh
#!/bin/bash
VPN_NAME=adm
PID_FILE=/var/run/openvpn.${VPN_NAME}.pid
if [ ! -f $PID_FILE -o ! -d /proc/$(< $PID_FILE) ]; then
if [[ ! -f $PID_FILE || ! -d /proc/$(< $PID_FILE) ]]; then
if fping -q komaz.crans.org; then
ln -sf komaz.conf /etc/openvpn/${VPN_NAME}.conf
if /etc/init.d/openvpn start ${VPN_NAME} > /dev/null; then