[[ ]] c'est mieux que [ ]
darcs-hash:20080106222221-af139-f6372d6eda53c94395fb788058ad73f6798a7f91.gz
This commit is contained in:
parent
34b7f27d34
commit
37bac59749
2 changed files with 4 additions and 4 deletions
|
@ -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 !'
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue