Commit 34fae026 authored by Kolbjørn Barmen's avatar Kolbjørn Barmen

Mye rart, shell til /bin/sh, rydde i variabelnavn

parent ef3546a1
#!/bin/bash #! /bin/sh
mp-rude=/usr/local/mp-rude
cd $mp-rude/etc
$mp-rude/tools/rude-config-maker -target $(hostname -f) rude-list.conf > rude.conf
set -e
mp_rude="/usr/local/mp-rude"
"${mp_rude}"/tools/rude-config-maker -target $(hostname -f) rude-list.conf > "${mp_rude}"/etc/rude.conf
#!/bin/bash #! /bin/sh
cat $1 | /bin/gzip > $2 cat $1 | /bin/gzip > $2
#!/bin/bash #! /bin/sh
source /etc/mp-rude/start.conf . /etc/mp-rude/start.conf
mkdir -p $logpath/$date mkdir -p "${logpath}"/"${date}"
log=$logpath/$date/traceroute_$1 log="${logpath}"/"${date}"/traceroute_$1
if test $2. -ne . ; then if [ $2. -ne . ] ; then
end=$(date --date "$2" +%s) end=$(date --date "$2" +%s)
else else
end=$(date --date "2099-12-31" +%s) end=$(date --date "2099-12-31" +%s)
...@@ -15,8 +15,8 @@ fi ...@@ -15,8 +15,8 @@ fi
# > $log.log # > $log.log
while test $(date +%s) -lt $end ; do while test $(date +%s) -lt $end ; do
date "+%s starttime %T" | gzip -c >> $log.gz date "+%s starttime %T" | gzip -c >> "${log}".gz
traceroute -q 6 -n $1 2> /dev/null | gzip -c >> $log.gz traceroute -q 6 -n $1 2> /dev/null | gzip -c >> "${log}".gz
sleep 60 sleep 60
done done
#) 9> $log.lock & #) 9> $log.lock &
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment