Fix doas config not working if /etc/doas.conf DNE

This commit is contained in:
Augusto Gunsch 2021-08-12 18:28:39 -03:00
parent fe72fe1581
commit 5ab8c9abe3
No known key found for this signature in database
GPG Key ID: F7EEFE29825C72DC
1 changed files with 1 additions and 0 deletions

View File

@ -412,6 +412,7 @@ configure_doas() {
prompt_user 'doas will be configured'
local DOAS_USER="$USER_OUT"
if [ -n "$DOAS_USER" ]; then
touch "$DOAS_CONF"
append_line $DOAS_CONF "permit persist $DOAS_USER as root"
append_line $DOAS_CONF "permit nopass $DOAS_USER as root cmd pacman args -Syu"
append_line $DOAS_CONF "permit nopass $DOAS_USER as root cmd pacman args -Syyu"