mirror of
https://github.com/YunoHost-Apps/jellyfin_ynh.git
synced 2024-09-03 19:26:29 +02:00
[enh] check /var/lib availability, comments cleanup
This commit is contained in:
parent
821d487c67
commit
66e31179e3
2 changed files with 3 additions and 31 deletions
|
@ -56,7 +56,8 @@ ynh_script_progression --message="Validating installation parameters..." --time
|
|||
### If the app uses nginx as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app".
|
||||
### If the app provides an internal web server (or uses another application server such as uwsgi), the final path should be "/opt/yunohost/$app"
|
||||
final_path=/etc/jellyfin
|
||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||
test ! -e "$final_path" || ynh_die --message="There is already a directory: $final_path "
|
||||
test ! -e "/var/lib/jellyfin" || ynh_die --message="There is already a directory: /var/lib/jellyfin "
|
||||
|
||||
# Register (book) web path
|
||||
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
||||
|
@ -78,11 +79,6 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring firewall..." --time --weight=1
|
||||
|
||||
### Use these lines if you have to open a port for the application
|
||||
### `ynh_find_port` will find the first available port starting from the given port.
|
||||
### If you're not using these lines:
|
||||
### - Remove the section "CLOSE A PORT" in the remove script
|
||||
|
||||
# Find an available port
|
||||
port=$(ynh_find_port --port=8095)
|
||||
ynh_app_setting_set --app=$app --key=port --value=$port
|
||||
|
@ -131,23 +127,12 @@ systemctl stop jellyfin
|
|||
# Port config
|
||||
ynh_replace_string --match_string="<HttpServerPortNumber>8096</HttpServerPortNumber>" --replace_string="<HttpServerPortNumber>$port</HttpServerPortNumber>" --target_file="/etc/jellyfin/system.xml"
|
||||
|
||||
# BaseUrl
|
||||
# BaseUrl config
|
||||
ynh_replace_string --match_string="<BaseUrl />" --replace_string="<BaseUrl>$path_url</BaseUrl>" --target_file="/etc/jellyfin/system.xml"
|
||||
|
||||
# Port config
|
||||
ynh_replace_string --match_string="<HttpServerPortNumber>8096</HttpServerPortNumber>" --replace_string="<HttpServerPortNumber>$port</HttpServerPortNumber>" --target_file="/etc/jellyfin/system.xml"
|
||||
|
||||
#=================================================
|
||||
# STORE THE CONFIG FILE CHECKSUM
|
||||
#=================================================
|
||||
|
||||
### `ynh_store_file_checksum` is used to store the checksum of a file.
|
||||
### That way, during the upgrade script, by using `ynh_backup_if_checksum_is_different`,
|
||||
### you can make a backup of this file before modifying it again if the admin had modified it.
|
||||
|
||||
# Calculate and store the config file checksum into the app settings
|
||||
#ynh_store_file_checksum "/etc/jellyfin/system.xml"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -79,19 +79,6 @@ ynh_script_progression --message="Making sure dedicated system user exists..." -
|
|||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
|
||||
### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
|
||||
### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it.
|
||||
#ynh_backup_if_checksum_is_different --file="$final_path/CONFIG_FILE"
|
||||
|
||||
#ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$final_path/CONFIG_FILE"
|
||||
|
||||
# Recalculate and store the checksum of the file for the next upgrade.
|
||||
#ynh_store_file_checksum --file="$final_path/CONFIG_FILE"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue