Inline function in setup-doas
This commit is contained in:
parent
782d7c8eca
commit
c6e83bea5e
1 changed files with 8 additions and 13 deletions
|
@ -11,18 +11,13 @@ sharedir="${localbase}"/share/sourcezap
|
||||||
# functions
|
# functions
|
||||||
. "${libexec}"/functions/print.sh
|
. "${libexec}"/functions/print.sh
|
||||||
|
|
||||||
install_doasconf()
|
|
||||||
{
|
|
||||||
src="${sharedir}"/doas.conf
|
|
||||||
dest="${localbase}"/etc/doas.conf
|
|
||||||
if grep -Fq "$(cat "${src}")" "${dest}"; then
|
|
||||||
printok "doas.conf is up to date"
|
|
||||||
else
|
|
||||||
cat "${src}" >> "${dest}"
|
|
||||||
printok "${dest} updated"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
install_doasconf
|
src="${sharedir}"/doas.conf
|
||||||
|
dest="${localbase}"/etc/doas.conf
|
||||||
|
if grep -Fq "$(cat "${src}")" "${dest}"; then
|
||||||
|
printok "doas.conf is up to date"
|
||||||
|
else
|
||||||
|
cat "${src}" >> "${dest}"
|
||||||
|
printok "${dest} updated"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue