1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/vaultwarden_ynh.git synced 2024-09-03 18:26:31 +02:00
This commit is contained in:
Éric Gaspar 2023-09-15 13:59:51 +02:00
parent 57dbfd1127
commit 657f09cb9a
2 changed files with 11 additions and 31 deletions

View file

@ -12,9 +12,6 @@ location __PATH__/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:__PORT_ROCKET__;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}
location __INSTALL_DIR__/notifications/hub {

View file

@ -50,6 +50,17 @@ ynh_script_progression --message="Configuring NGINX web server..."
# Create a dedicated NGINX config
ynh_add_nginx_config
# Create a dedicated systemd config
ynh_add_systemd_config
# Use logrotate to manage application logfile(s)
mkdir -p "/var/log/$app"
chown -R $app:$app "/var/log/$app"
ynh_use_logrotate
yunohost service add $app --description="$app daemon for vaultwarden" --log="/var/log/$app/$app.log"
#=================================================
# MAKE INSTALL
#=================================================
@ -59,7 +70,6 @@ mv -f "$install_dir/build/vaultwarden" "$install_dir/live/vaultwarden"
rsync -a "$install_dir/build/web-vault/" "$install_dir/live/web-vault/"
ynh_secure_remove --file="$install_dir/build"
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir"
@ -73,33 +83,6 @@ ynh_add_config --template="../conf/vaultwarden.env" --destination="$install_dir/
chmod 400 "$install_dir/live/.env"
chown $app:$app "$install_dir/live/.env"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..."
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Configuring log rotation..."
# Use logrotate to manage application logfile(s)
mkdir -p "/var/log/$app"
chown -R $app:$app "/var/log/$app"
ynh_use_logrotate
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="$app daemon for vaultwarden" --log="/var/log/$app/$app.log"
#=================================================
# START SYSTEMD SERVICE
#=================================================