1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kavita_ynh.git synced 2024-09-03 19:26:30 +02:00
This commit is contained in:
Éric Gaspar 2023-05-23 15:11:05 +02:00
parent b51d1f6092
commit 701d21e944
6 changed files with 44 additions and 2 deletions

View file

@ -0,0 +1,6 @@
{
"TokenKey": "super secret unguessable key",
"Port": __PORT__,
"IpAddresses": "",
"BaseUrl": "__URL_PATH__"
}

View file

@ -19,7 +19,7 @@ code = "https://github.com/Kareadita/Kavita"
[integration] [integration]
yunohost = ">= 11.1.19" yunohost = ">= 11.1.19"
architectures = ["amd64", "arm64", "armhf"] architectures = ["amd64", "arm64", "armhf"]
multi_instance = false multi_instance = true
ldap = false ldap = false
sso = false sso = false
disk = "50M" disk = "50M"

View file

@ -25,6 +25,21 @@ ynh_script_progression --message="Updating NGINX web server configuration..." --
ynh_change_url_nginx_config ynh_change_url_nginx_config
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
# CONFIGURE Kavita
#=================================================
ynh_backup_if_checksum_is_different --file="$install_dir/config/appsettings.json"
domain=$new_domain
url_path=${new_path#/}
ynh_add_config --template="../conf/appsettings.json.example" --destination="$install_dir/config/appsettings.json"
chmod 400 "$install_dir/config/appsettings.json"
chown $app:$app "$install_dir/config/appsettings.json"
#================================================= #=================================================
# GENERIC FINALISATION # GENERIC FINALISATION
#================================================= #=================================================

View file

@ -34,6 +34,17 @@ ynh_add_systemd_config
yunohost service add $app --description="Cross platform reading server" --log="/var/log/$app/$app.log" yunohost service add $app --description="Cross platform reading server" --log="/var/log/$app/$app.log"
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_script_progression --message="Modifying a config file..." --weight=1
url_path=${path#/}
ynh_add_config --template="../conf/appsettings.json.example" --destination="$install_dir/config/appsettings.json"
chmod 600 "$install_dir/config/appsettings.json"
chown $app:$app "$install_dir/config/appsettings.json"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================

View file

@ -40,6 +40,17 @@ chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
chmod +x $install_dir/Kavita chmod +x $install_dir/Kavita
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_script_progression --message="Modifying a config file..." --weight=1
url_path=${path#/}
ynh_add_config --template="../conf/appsettings.json.example" --destination="$install_dir/config/appsettings.json"
chmod 600 "$install_dir/config/appsettings.json"
chown $app:$app "$install_dir/config/appsettings.json"
#================================================= #=================================================
# REAPPLY SYSTEM CONFIGURATIONS # REAPPLY SYSTEM CONFIGURATIONS
#================================================= #=================================================

View file

@ -6,7 +6,6 @@ test_format = 1.0
# Default args to use for install # Default args to use for install
# ------------------------------- # -------------------------------
# ------------------------------- # -------------------------------
# Commits to test upgrade from # Commits to test upgrade from
# ------------------------------- # -------------------------------