mirror of
https://github.com/YunoHost-Apps/komga_ynh.git
synced 2024-09-03 19:36:07 +02:00
Fix
This commit is contained in:
parent
9bb3b42959
commit
79c2cfd42d
5 changed files with 44 additions and 24 deletions
26
application.yml
Normal file
26
application.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
komga:
|
||||
libraries-scan-cron: "* */15 * * * ?" #periodic scan every 15 minutes
|
||||
libraries-scan-cron: "-" #disable periodic scan
|
||||
libraries-scan-startup: false #scan libraries at startup
|
||||
libraries-scan-directory-exclusions: #patterns to exclude directories from the scan
|
||||
- "#recycle" #synology NAS recycle bin
|
||||
- "@eaDir" #synology NAS index/metadata folders
|
||||
remember-me:
|
||||
key: changeMe! #required to activate the remember-me auto-login via cookies
|
||||
validity: 2592000 #validity of the cookie in seconds, here 1 month
|
||||
database:
|
||||
file: /home/__APP__/.komga/database.sqlite
|
||||
database-backup:
|
||||
path: ~/.komga/database-backup.zip
|
||||
schedule: "0 0 */6 * * ?" #every 6 hours
|
||||
enabled: true
|
||||
startup: true
|
||||
server:
|
||||
port: __PORT__
|
||||
servlet.context-path: __PATH__/
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:h2:/path/to/your/database.h2 #absolute path for Unix
|
||||
url: jdbc:h2:D:\\komga\database.h2 #absolute path for Windows
|
||||
url: jdbc:h2:~/.komga/database.h2 #relative path to user home directory
|
||||
url: jdbc:h2:./komga/database.h2 #relative path to current directory
|
|
@ -69,7 +69,7 @@ fi
|
|||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
||||
ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# MODIFY URL IN NGINX CONF
|
||||
|
@ -107,7 +107,7 @@ fi
|
|||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=5
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
|
@ -100,12 +100,6 @@ ynh_system_user_create --username=$app
|
|||
|
||||
mkdir -p /home/$app/.komga/
|
||||
|
||||
#=================================================
|
||||
# SECURING FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
chmod -R 755 /home/$app/.komga/
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
@ -125,6 +119,8 @@ ynh_add_systemd_config
|
|||
|
||||
# Set permissions to app files
|
||||
chown -R $app: $final_path
|
||||
chown -R $app: /home/$app
|
||||
chmod -R 755 /home/$app/.komga/
|
||||
|
||||
#=================================================
|
||||
# SETUP LOGROTATE
|
||||
|
|
|
@ -56,7 +56,7 @@ ynh_script_progression --message="Removing app main directory and database..." -
|
|||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
ynh_secure_remove --file="/home/komga/"
|
||||
ynh_secure_remove --file="/home/komga"
|
||||
|
||||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
|
@ -80,10 +80,8 @@ ynh_remove_logrotate
|
|||
# REMOVE VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
ynh_secure_remove --file="/etc/$app/"
|
||||
|
||||
# Remove the log files
|
||||
ynh_secure_remove --file="/var/log/$app/"
|
||||
ynh_secure_remove --file="/var/log/$app"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..." --time --weight=1
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -30,12 +30,12 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --time --weight=1
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=2
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
|
@ -50,9 +50,9 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..." --time --weight=1
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=2
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
||||
ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -60,7 +60,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app
|
|||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --time --weight=1
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=3
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
|
@ -69,7 +69,7 @@ fi
|
|||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --time --weight=1
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=5
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
@ -77,26 +77,26 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --time --weight=1
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..." --time --weight=1
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
ynh_replace_string --match_string=__PORT__ --replace_string="$port" --target_file="../conf/systemd.service"
|
||||
ynh_replace_string --match_string=__PATH__ --replace_string="$path_url" --target_file="../conf/systemd.service"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1
|
||||
|
||||
ynh_replace_string --match_string=__PORT__ --replace_string="$port" --target_file="../conf/systemd.service"
|
||||
ynh_replace_string --match_string=__PATH__ --replace_string="$path_url" --target_file="../conf/systemd.service"
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
|
|
Loading…
Reference in a new issue