1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/adguardhome_ynh.git synced 2024-09-03 18:06:23 +02:00
This commit is contained in:
liberodark 2019-01-09 09:48:23 +01:00
parent 6d7f14c134
commit 19e47b500e
3 changed files with 31 additions and 1 deletions

View file

@ -2,6 +2,6 @@ SOURCE_URL=https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.92-ho
SOURCE_SUM=6510a8b588538f4daa7090fdaf462a28eda97608b5181241bc125ba1194b3ed2d9595b767eac2ef693939e016bc41fe153cc086534d233ab0ad5e2bb23203bc2 SOURCE_SUM=6510a8b588538f4daa7090fdaf462a28eda97608b5181241bc125ba1194b3ed2d9595b767eac2ef693939e016bc41fe153cc086534d233ab0ad5e2bb23203bc2
SOURCE_SUM_PRG=sha512sum SOURCE_SUM_PRG=sha512sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false SOURCE_IN_SUBDIR=true
SOURCE_EXTRACT=true SOURCE_EXTRACT=true
SOURCE_FILENAME=adguard.tar.gz SOURCE_FILENAME=adguard.tar.gz

16
conf/systemd.service Normal file
View file

@ -0,0 +1,16 @@
[Unit]
Description=adguard
After=network.target
[Service]
WorkingDirectory=__FINALPATH__
User=admin
Group=users
Type=simple
UMask=000
ExecStart=__FINALPATH__/AdGuardHome
RestartSec=15
Restart=always
[Install]
WantedBy=multi-user.target

View file

@ -95,6 +95,19 @@ ynh_app_setting_set $app final_path $final_path
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source "$final_path" ynh_setup_source "$final_path"
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_replace_string "__FINALPATH__" "$final_path" "../conf/systemd.service"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_add_systemd_config
systemctl enable $app.service
#============================================== #==============================================
# INSTALL ADGUARD # INSTALL ADGUARD
#============================================== #==============================================
@ -160,3 +173,4 @@ fi
# Reload services # Reload services
systemctl reload nginx systemctl reload nginx
systemctl start $app.service