Install dependencies and configure doas
This commit is contained in:
parent
8c27138240
commit
89aefee296
1 changed files with 26 additions and 0 deletions
|
@ -44,3 +44,29 @@ fi
|
||||||
# Migrate database
|
# Migrate database
|
||||||
echo "[migrate] Database"
|
echo "[migrate] Database"
|
||||||
<%= @app_dir %>/bin/<%= @name %> eval "Freedive.Release.migrate"
|
<%= @app_dir %>/bin/<%= @name %> eval "Freedive.Release.migrate"
|
||||||
|
|
||||||
|
# Install inotify-tools
|
||||||
|
if pkg info inotify-tools > /dev/null 2>&1 ; then
|
||||||
|
echo "[ok] inotify-tools is installed"
|
||||||
|
else
|
||||||
|
echo "[install] inotify-tools"
|
||||||
|
pkg install -U -y inotify-tools
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Install doas
|
||||||
|
if pkg info doas > /dev/null 2>&1 ; then
|
||||||
|
echo "[ok] doas is installed"
|
||||||
|
else
|
||||||
|
echo "[install] doas"
|
||||||
|
pkg install -U -y doas
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Configure doas
|
||||||
|
touch /usr/local/etc/doas.conf
|
||||||
|
if ! grep -q "permit nopass <%= @user %> as root" /usr/local/etc/doas.conf ; then
|
||||||
|
echo "[configure] doas"
|
||||||
|
echo "permit nopass <%= @user %> as root" >> /usr/local/etc/doas.conf
|
||||||
|
else
|
||||||
|
echo "[ok] doas is configured"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue