1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wireguard_ynh.git synced 2024-09-03 20:35:58 +02:00

SMTP configuration

This commit is contained in:
Tagadda 2022-01-29 11:57:32 +00:00
parent 154ddfdd96
commit 4fc5b1cb3e
5 changed files with 23 additions and 1 deletions

8
conf/wireguard-ui.env Normal file
View file

@ -0,0 +1,8 @@
SMTP_HOST=127.0.0.1
SMTP_PORT=25
SMTP_NO_TLS_CHECK=true
SMTP_AUTH_TYPE=None
EMAIL_FROM_NAME=WireGuard
EMAIL_FROM_ADDRESS=wireguard-ui@__MAIN_DOMAIN__
BIND_ADDRESS=127.0.0.1:__PORT__
DISABLE_LOGIN=true

View file

@ -7,7 +7,8 @@ Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__FINALPATH__/
ExecStart=__FINALPATH__/wireguard-ui --bind-address="127.0.0.1:__PORT__" --disable-login
EnvironmentFile=__FINALPATH__/wireguard-ui.env
ExecStart=__FINALPATH__/wireguard-ui
# Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these

View file

@ -17,6 +17,8 @@ pkg_dependencies="$pkg_headers wireguard-dkms wireguard"
interface=$(ip route | awk '/default/ { print $5 }')
main_domain=$(cat /etc/yunohost/current_host)
#=================================================
# PERSONAL HELPERS
#=================================================

View file

@ -131,6 +131,9 @@ mkdir -p $final_path/db/server
ynh_add_config --template="../conf/interfaces.json" --destination="$final_path/db/server/interfaces.json"
ynh_delete_file_checksum --file="$final_path/db/server/interfaces.json"
# Add configuration for the Web UI
ynh_add_config --template="../conf/wireguard-ui.env" --destination="$final_path/wireguard-ui.env"
# Create WireGuard configuration directory
mkdir -p /etc/wireguard

View file

@ -129,6 +129,14 @@ then
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
fi
#=================================================
# UPDATE A CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1
# Update configuration for the Web UI
ynh_add_config --template="../conf/wireguard-ui.env" --destination="$final_path/wireguard-ui.env"
#=================================================
# NGINX CONFIGURATION
#=================================================