mirror of
https://github.com/YunoHost-Apps/kavita_ynh.git
synced 2024-09-03 19:26:30 +02:00
cleaning
This commit is contained in:
parent
b51d1f6092
commit
701d21e944
6 changed files with 44 additions and 2 deletions
6
conf/appsettings.json.example
Normal file
6
conf/appsettings.json.example
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"TokenKey": "super secret unguessable key",
|
||||
"Port": __PORT__,
|
||||
"IpAddresses": "",
|
||||
"BaseUrl": "__URL_PATH__"
|
||||
}
|
|
@ -19,7 +19,7 @@ code = "https://github.com/Kareadita/Kavita"
|
|||
[integration]
|
||||
yunohost = ">= 11.1.19"
|
||||
architectures = ["amd64", "arm64", "armhf"]
|
||||
multi_instance = false
|
||||
multi_instance = true
|
||||
ldap = false
|
||||
sso = false
|
||||
disk = "50M"
|
||||
|
|
|
@ -25,6 +25,21 @@ ynh_script_progression --message="Updating NGINX web server configuration..." --
|
|||
|
||||
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
|
||||
#=================================================
|
||||
|
|
|
@ -34,6 +34,17 @@ ynh_add_systemd_config
|
|||
|
||||
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
|
||||
#=================================================
|
||||
|
|
|
@ -40,6 +40,17 @@ chmod -R o-rwx "$install_dir"
|
|||
chown -R $app:www-data "$install_dir"
|
||||
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
|
||||
#=================================================
|
||||
|
|
|
@ -6,7 +6,6 @@ test_format = 1.0
|
|||
# Default args to use for install
|
||||
# -------------------------------
|
||||
|
||||
|
||||
# -------------------------------
|
||||
# Commits to test upgrade from
|
||||
# -------------------------------
|
Loading…
Add table
Reference in a new issue