mirror of
https://github.com/YunoHost-Apps/minidlna_ynh.git
synced 2024-09-03 19:36:34 +02:00
54 lines
1.5 KiB
Bash
54 lines
1.5 KiB
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
if [ ! -e _common.sh ]; then
|
|
# Get the _common.sh file if it's not in the current directory
|
|
cp ../settings/scripts/_common.sh ./_common.sh
|
|
chmod a+rx _common.sh
|
|
fi
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# MANAGE SCRIPT FAILURE
|
|
#=================================================
|
|
|
|
# Exit if an error occurs during the execution of the script
|
|
ynh_abort_if_errors
|
|
|
|
#=================================================
|
|
# LOAD SETTINGS
|
|
#=================================================
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
version=$(ynh_app_setting_get $app version)
|
|
|
|
#=================================================
|
|
# SPECIFIC BACKUP
|
|
#=================================================
|
|
# BACKUP OF THE APT SOURCE
|
|
#=================================================
|
|
|
|
# Copie des fichiers spécifiques à l'application
|
|
if [ $version = "B" ]
|
|
then
|
|
ynh_backup "/etc/apt/sources.list.d/minidlna.list"
|
|
fi
|
|
|
|
#=================================================
|
|
# BACKUP OF THE INOTIFY'S CONFIG
|
|
#=================================================
|
|
|
|
ynh_backup "/etc/sysctl.d/90-inotify_minidlna.conf"
|
|
|
|
#=================================================
|
|
# BACKUP OF THE CONFIG OF MINIDLNA
|
|
#=================================================
|
|
|
|
ynh_backup "/etc/minidlna.conf"
|