mirror of
https://github.com/YunoHost-Apps/jellyfin_ynh.git
synced 2024-09-03 19:26:29 +02:00
* Manifestv2 * add back user and install_dir to manifest * Update manifest.toml * rewrite update_version.sh in python for toml * Bump jellyfin-ffmpeg to 6.0-6 as #136 (Thanks @Tagadda) * Only add user to render group if not already * Remove line_match from ynh_systemd_actions : they actually just match when systemctl returns * Fix upgrade: uninstall previous packages * Installation of deb packages will overwrite the configuration files, so to prevent a warning we backup those files beforehand. * Test with a long sleep * Auto-update README * update_version: fix linter * Add ldap to update_version.py * Revert sleep 30 from debugging * Do not remove packages during upgrade * Fix upgrade again --------- Co-authored-by: Félix Piédallu <felix@piedallu.me> Co-authored-by: yunohost-bot <yunohost@yunohost.org>
75 lines
2.5 KiB
Bash
75 lines
2.5 KiB
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# STANDARD REMOVE
|
|
#=================================================
|
|
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
|
#=================================================
|
|
|
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
|
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
|
then
|
|
ynh_script_progression --message="Removing $app service integration..." --weight=3
|
|
yunohost service remove "$app"
|
|
fi
|
|
|
|
#=================================================
|
|
# REMOVE SYSTEM CONFIGURATIONS
|
|
#=================================================
|
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
|
|
|
ynh_remove_logrotate
|
|
|
|
ynh_remove_nginx_config
|
|
|
|
#=================================================
|
|
# REMOVE PACKAGES
|
|
#=================================================
|
|
ynh_script_progression --message="Removing packages..." --weight=1
|
|
|
|
ynh_remove_app_dependencies
|
|
|
|
#=================================================
|
|
# CLOSE A PORT
|
|
#=================================================
|
|
|
|
if [[ $discovery_service -eq 1 ]] && yunohost firewall list | grep -q "\- $discovery_service_port$"
|
|
then
|
|
ynh_script_progression --message="Closing port $discovery_service_port..." --weight=1
|
|
ynh_exec_warn_less yunohost firewall disallow UDP $discovery_service_port
|
|
fi
|
|
|
|
if [[ $discovery_client -eq 1 ]] && yunohost firewall list | grep -q "\- $discovery_client_port$"
|
|
then
|
|
ynh_script_progression --message="Closing port $discovery_client_port..." --weight=1
|
|
ynh_exec_warn_less yunohost firewall disallow UDP $discovery_client_port
|
|
fi
|
|
|
|
#=================================================
|
|
# SPECIFIC REMOVE
|
|
#=================================================
|
|
# REMOVE VARIOUS FILES
|
|
#=================================================
|
|
ynh_script_progression --message="Removing various files..." --weight=1
|
|
|
|
ynh_secure_remove --file="$config_path"
|
|
ynh_secure_remove --file="/etc/systemd/system/jellyfin.service.d"
|
|
ynh_secure_remove --file="/etc/sudoers.d/jellyfin-sudoers"
|
|
|
|
# Remove the log files
|
|
ynh_secure_remove --file="/var/log/$app"
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
|
|
ynh_script_progression --message="Removal of $app completed" --last
|