Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maalepaaler
mp-rude
Commits
4dd26572
Commit
4dd26572
authored
Feb 21, 2019
by
Kolbjørn Barmen
Browse files
Move pid file to /run/mp-rude.pids so it not present at boot
parent
b0196b87
Changes
3
Hide whitespace changes
Inline
Side-by-side
build.sh
View file @
4dd26572
...
...
@@ -8,7 +8,7 @@ apt-get update
apt-get
-y
upgrade
package
=
"mp-rude"
version
=
"1.3.
5
"
version
=
"1.3.
6
"
#version=$(git describe|perl -p -e 'chomp;s/v([^-]+)(-(\d+)-g.+)?$/\1+\3/;s/\+$//')
...
...
mp-rude/etc/mp-rude/start.conf
View file @
4dd26572
...
...
@@ -3,3 +3,4 @@ bin="/usr/share/mp-rude"
logpath
=
"/var/lib/mp-rude"
trace
=
"${bin}"
/
trace
.
sh
traceconf
=
"/etc/mp-rude/trace.conf"
pidfile
=
"/run/mp-rude.pids"
mp-rude/usr/share/mp-rude/start.sh
View file @
4dd26572
...
...
@@ -6,14 +6,15 @@ set -e
log
=
"
${
logpath
}
"
/
"
${
date
}
"
/
"traceroute_
$1
"
if
[
-f
"
${
logpath
}
"
/pids
]
;
then
echo
"ERROR:
${
logpath
}
/pids already exists!"
pidfile
=
${
pidfile
:-
/run/mp-rude.pids
}
if
[
-f
"
${
pidfile
}
"
]
;
then
echo
"ERROR:
${
pidfile
}
already exists!"
exit
1
fi
#Start traceroute
for
i
in
$(
cat
${
traceconf
}
)
;
do
${
trace
}
${
i
}
23:59
>
/dev/null 2>&1 &
echo
"
$!
"
>>
"
${
logpath
}
"
/pids
echo
"
$!
"
>>
"
${
pidfile
}
"
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment