mirror of
https://github.com/YunoHost-Apps/UMS_ynh.git
synced 2024-10-01 13:35:01 +02:00
commit
c200851731
11 changed files with 38 additions and 36 deletions
|
@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
A DLNA, UPnP and HTTP(S) Media Server
|
A DLNA, UPnP and HTTP(S) Media Server
|
||||||
|
|
||||||
**Shipped version:** 10.15.0
|
**Shipped version:** 10.16.0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
|
|
||||||
Un Serveur Multimedia DLNA, UPnP et HTTP(S)
|
Un Serveur Multimedia DLNA, UPnP et HTTP(S)
|
||||||
|
|
||||||
**Version incluse :** 10.15.0
|
**Version incluse :** 10.16.0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
setup_private=1
|
setup_private=1
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
upgrade=1 from_commit=0bdac48b6ee51cbfd687a1e3a693f105f79185b6
|
upgrade=1 from_commit=e163e711145f6dd5674e25ba378c6807d3a4f748
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=0
|
multi_instance=0
|
||||||
port_already_use=1
|
port_already_use=1
|
||||||
|
|
|
@ -13,10 +13,6 @@ location __PATH__/ {
|
||||||
proxy_pass http://localhost:__PORT_WEB__/;
|
proxy_pass http://localhost:__PORT_WEB__/;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
# Force usage of https
|
|
||||||
if ($scheme = http) {
|
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
"en": "A DLNA, UPnP and HTTP(S) Media Server",
|
"en": "A DLNA, UPnP and HTTP(S) Media Server",
|
||||||
"fr": "Un Serveur Multimedia DLNA, UPnP et HTTP(S)"
|
"fr": "Un Serveur Multimedia DLNA, UPnP et HTTP(S)"
|
||||||
},
|
},
|
||||||
"version": "10.15.0~ynh1",
|
"version": "10.16.0~ynh1",
|
||||||
"url": "www.universalmediaserver.com",
|
"url": "www.universalmediaserver.com",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"version": "10.15.0",
|
"version": "10.16.0",
|
||||||
"license": "GPL-2.0-or-later",
|
"license": "GPL-2.0-or-later",
|
||||||
"website": "www.universalmediaserver.com",
|
"website": "www.universalmediaserver.com",
|
||||||
"admindoc": "https://github.com/UniversalMediaServer/UniversalMediaServer/wiki",
|
"admindoc": "https://github.com/UniversalMediaServer/UniversalMediaServer/wiki",
|
||||||
|
@ -32,7 +32,6 @@
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain",
|
"type": "domain",
|
||||||
"example": "example.com",
|
|
||||||
"help": {
|
"help": {
|
||||||
"en": "UMS require its own subdomain",
|
"en": "UMS require its own subdomain",
|
||||||
"fr": "UMS a besoin de son propre sous-domaine"
|
"fr": "UMS a besoin de son propre sous-domaine"
|
||||||
|
|
|
@ -9,11 +9,11 @@ pkg_dependencies="mediainfo dcraw p7zip"
|
||||||
|
|
||||||
mach=`uname -m`
|
mach=`uname -m`
|
||||||
|
|
||||||
sha256_arm64=0480572e9cb5c4aae8fddc9cea1402d7e0466a98dab4b19fe32a660a543fbf4d
|
sha256_arm64=9bfbb42c68bf4fcdaaa37ab442bab42a56075b70d9092fbd4062c0f2d75fc570
|
||||||
sha256_armel=fbb7e56abaf3bbf55457d46d5f72843a039b039ffe5a886fce1b91c0f01c6d6e
|
sha256_armel=7ac0048d9908afdb66b724dc571b7fbdbfd0cb18d18248a5667ca066ecd1515f
|
||||||
sha256_armhf=a14163ee429b8762d477d4845859d6bf5a1ff3b77cf64f5fffc65e170e701206
|
sha256_armhf=70c3b834140816837c102541e3025b01795ff0d530ae82d21e308d2dc140bc08
|
||||||
sha256_x86_64=664c4f006fc66f82aaef67186d4c77b2d2c581c8756c56579397a7a6fc938d2f
|
sha256_x86_64=dd0aa1347dc223b83b647efc8004752624a187af937f838441fc259dd8d98077
|
||||||
sha256_x86=7e7fffe1d3ea345ef9d60a9fdb0cb38978ce8739ebffd8b0b7d799be58cfbc40
|
sha256_x86=c7d948d2245f306f95661808cb279563ac792d68f04b33c54f35c2d47d73ed49
|
||||||
|
|
||||||
case "$mach" in
|
case "$mach" in
|
||||||
"armv6l" ) mach="armel"
|
"armv6l" ) mach="armel"
|
||||||
|
|
|
@ -76,7 +76,7 @@ ynh_backup --src_path="/etc/systemd/system/$app.service"
|
||||||
# BACKUP VARIOUS FILES
|
# BACKUP VARIOUS FILES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup --src_path="/home/$app/"
|
ynh_backup --src_path="/home/yunohost.app/$app/"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -86,7 +86,7 @@ ynh_script_progression --message="Configuring system user..." --weight=1
|
||||||
|
|
||||||
# Create a system user
|
# Create a system user
|
||||||
#UMS require a home path for the user as config files are stored in there
|
#UMS require a home path for the user as config files are stored in there
|
||||||
ynh_system_user_create --username=$app --home_dir=/home/$app
|
ynh_system_user_create --username=$app --home_dir=/home/yunohost.app/$app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
#SETTING MULTIMEDIA DIRECTORY
|
#SETTING MULTIMEDIA DIRECTORY
|
||||||
|
@ -141,13 +141,13 @@ ynh_add_systemd_config
|
||||||
ynh_script_progression --message="Setting up configuration file.." --weight=5
|
ynh_script_progression --message="Setting up configuration file.." --weight=5
|
||||||
|
|
||||||
#UMS read config file from .config/UMS folder
|
#UMS read config file from .config/UMS folder
|
||||||
mkdir -p "/home/$app/.config/UMS"
|
mkdir -p "/home/yunohost.app/$app/.config/UMS"
|
||||||
ynh_add_config --template="UMS.conf.default" --destination="/home/$app/.config/UMS/UMS.conf"
|
ynh_add_config --template="UMS.conf.default" --destination="/home/yunohost.app/$app/.config/UMS/UMS.conf"
|
||||||
ynh_add_config --template="WEB.conf.default" --destination="/home/$app/.config/UMS/WEB.conf"
|
ynh_add_config --template="WEB.conf.default" --destination="/home/yunohost.app/$app/.config/UMS/WEB.conf"
|
||||||
ynh_add_config --template="VirtualFolders.conf.default" --destination="/home/$app/.config/UMS/VirtualFolders.conf"
|
ynh_add_config --template="VirtualFolders.conf.default" --destination="/home/yunohost.app/$app/.config/UMS/VirtualFolders.conf"
|
||||||
chown -R $app:$app "/home/$app/.config"
|
chown -R $app:$app "/home/yunohost.app/$app/.config"
|
||||||
chmod -R 700 "/home/$app/.config"
|
chmod -R 700 "/home/yunohost.app/$app/.config"
|
||||||
#chmod 600 "/home/$app/.config/UMS/*"
|
#chmod 600 "/home/yunohost.app/$app/.config/UMS/*"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
|
|
@ -108,7 +108,7 @@ ynh_script_progression --message="Removing the dedicated system user..." --weigh
|
||||||
|
|
||||||
# Delete a system user
|
# Delete a system user
|
||||||
ynh_system_user_delete --username=$app
|
ynh_system_user_delete --username=$app
|
||||||
ynh_secure_remove --file="/home/$app"
|
ynh_secure_remove --file="/home/yunohost.app/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -68,7 +68,7 @@ ynh_script_progression --message="Recreating the dedicated system user..." --wei
|
||||||
|
|
||||||
# Create the dedicated user (if not existing)
|
# Create the dedicated user (if not existing)
|
||||||
#UMS require a home path for the user as config files are stored in there
|
#UMS require a home path for the user as config files are stored in there
|
||||||
ynh_system_user_create --username=$app --home_dir=/home/$app
|
ynh_system_user_create --username=$app --home_dir=/home/yunohost.app/$app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
#SETTING MULTIMEDIA DIRECTORY
|
#SETTING MULTIMEDIA DIRECTORY
|
||||||
|
@ -125,9 +125,9 @@ yunohost service add $app --description="A DLNA, UPnP and HTTP(S) Media Server."
|
||||||
# RESTORE VARIOUS FILES
|
# RESTORE VARIOUS FILES
|
||||||
#=================================================
|
#=================================================
|
||||||
mkdir -p /var/log/$app
|
mkdir -p /var/log/$app
|
||||||
ynh_restore_file --origin_path="/home/$app/"
|
ynh_restore_file --origin_path="/home/yunohost.app/$app/"
|
||||||
chown -R $app:$app "/home/$app/.config"
|
chown -R $app:$app "/home/yunohost.app/$app/.config"
|
||||||
chmod -R 700 "/home/$app/.config"
|
chmod -R 700 "/home/yunohost.app/$app/.config"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE LOGROTATE CONFIGURATION
|
# RESTORE THE LOGROTATE CONFIGURATION
|
||||||
|
|
|
@ -29,12 +29,6 @@ upstream_version=$(ynh_app_upstream_version)
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
upgrade_type=$(ynh_check_app_version_changed)
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -49,6 +43,19 @@ ynh_clean_setup () {
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||||
|
|
||||||
|
#move home folder from previous /home/app to /home/yunohost.app/$app
|
||||||
|
#has to be after backup, otherwise backup will not find home folder and will fail
|
||||||
|
if [ ! $(getent passwd $app | cut -d: -f6 | grep yunohost.app) ]
|
||||||
|
then
|
||||||
|
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
||||||
|
usermod -m -d /home/yunohost.app/$app $app
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -94,7 +101,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
||||||
|
|
||||||
# Create a dedicated user (if not existing)
|
# Create a dedicated user (if not existing)
|
||||||
ynh_system_user_create --username=$app --home_dir=/home/$app
|
ynh_system_user_create --username=$app --home_dir=/home/yunohost.app/$app
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
|
|
Loading…
Add table
Reference in a new issue