Fix boringtun path
/usr/local/sbin is not included in the cron $PATH, so the absolute path needs to be used when running the boringtun binary.
This commit is contained in:
parent
92d4914c8e
commit
f2f0d3d3ac
1 changed files with 2 additions and 2 deletions
|
@ -468,7 +468,7 @@ if ! head -1 <<< "$latest" | grep -qiE "^boringtun.+[0-9]+\.[0-9]+.*$"; then
|
||||||
echo "Update server unavailable"
|
echo "Update server unavailable"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
current=$(boringtun -V)
|
current=$(/usr/local/sbin/boringtun -V)
|
||||||
if [[ "$current" != "$latest" ]]; then
|
if [[ "$current" != "$latest" ]]; then
|
||||||
download="https://wg.nyr.be/1/latest/download"
|
download="https://wg.nyr.be/1/latest/download"
|
||||||
xdir=$(mktemp -d)
|
xdir=$(mktemp -d)
|
||||||
|
@ -478,7 +478,7 @@ if [[ "$current" != "$latest" ]]; then
|
||||||
rm -f /usr/local/sbin/boringtun
|
rm -f /usr/local/sbin/boringtun
|
||||||
mv "$xdir"/boringtun /usr/local/sbin/boringtun
|
mv "$xdir"/boringtun /usr/local/sbin/boringtun
|
||||||
systemctl start wg-quick@wg0.service
|
systemctl start wg-quick@wg0.service
|
||||||
echo "Succesfully updated to $(boringtun -V)"
|
echo "Succesfully updated to $(/usr/local/sbin/boringtun -V)"
|
||||||
else
|
else
|
||||||
echo "boringtun update failed"
|
echo "boringtun update failed"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue