mirror of
https://github.com/YunoHost-Apps/UMS_ynh.git
synced 2024-10-01 13:35:01 +02:00
Change file access
This commit is contained in:
parent
0db6a281f8
commit
05a2703c7d
5 changed files with 20 additions and 14 deletions
|
@ -10,7 +10,6 @@ version = "13.5.0~ynh2"
|
||||||
maintainers = ["Krakinou"]
|
maintainers = ["Krakinou"]
|
||||||
|
|
||||||
[upstream]
|
[upstream]
|
||||||
version = "13.5.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"
|
||||||
|
@ -22,16 +21,15 @@ architectures = "all"
|
||||||
multi_instance = false
|
multi_instance = false
|
||||||
ldap = false
|
ldap = false
|
||||||
sso = false
|
sso = false
|
||||||
disk = "50M"
|
disk = "270M"
|
||||||
ram.build = "50M"
|
ram.build = "350M"
|
||||||
ram.runtime = "50M"
|
ram.runtime = "350M"
|
||||||
|
|
||||||
[install]
|
[install]
|
||||||
[install.domain]
|
[install.domain]
|
||||||
help.en = "UMS require its own subdomain"
|
help.en = "UMS require its own subdomain"
|
||||||
help.fr = "UMS a besoin de son propre sous-domaine"
|
help.fr = "UMS a besoin de son propre sous-domaine"
|
||||||
type = "domain"
|
type = "domain"
|
||||||
full_domain = true
|
|
||||||
|
|
||||||
[install.init_main_permission]
|
[install.init_main_permission]
|
||||||
help.en = "Everybody will be able to access your media on the internet without connecting to Yunohost"
|
help.en = "Everybody will be able to access your media on the internet without connecting to Yunohost"
|
||||||
|
@ -76,7 +74,7 @@ ram.runtime = "50M"
|
||||||
|
|
||||||
[resources.ports]
|
[resources.ports]
|
||||||
main.default = 9001
|
main.default = 9001
|
||||||
end.default = 5001
|
rend.default = 5001
|
||||||
rend.exposed = "TCP"
|
rend.exposed = "TCP"
|
||||||
|
|
||||||
[resources.system_user]
|
[resources.system_user]
|
||||||
|
@ -84,7 +82,8 @@ ram.runtime = "50M"
|
||||||
[resources.install_dir]
|
[resources.install_dir]
|
||||||
|
|
||||||
[resources.data_dir]
|
[resources.data_dir]
|
||||||
subdirs = ".config/UMS"
|
dir = "/home/yunohost.app/__APP__"
|
||||||
|
subdirs = [ '.config', '.config/UMS' ]
|
||||||
|
|
||||||
[resources.permissions]
|
[resources.permissions]
|
||||||
main.url = "/"
|
main.url = "/"
|
||||||
|
|
|
@ -31,9 +31,10 @@ ynh_script_progression --message="Setting up source files..." --weight=12
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
|
||||||
|
chmod 750 "$install_dir"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R root:$app "$install_dir"
|
chown -R $app:$app "$install_dir"
|
||||||
chown root:$app "$install_dir/UMS.sh"
|
chown $app:$app "$install_dir/UMS.sh"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
@ -56,6 +57,7 @@ ynh_add_systemd_config
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Setting up configuration file.." --weight=5
|
ynh_script_progression --message="Setting up configuration file.." --weight=5
|
||||||
|
|
||||||
|
mkdir -p "$data_dir/.config/UMS"
|
||||||
ynh_add_config --template="UMS.conf.default" --destination="$data_dir/.config/UMS/UMS.conf"
|
ynh_add_config --template="UMS.conf.default" --destination="$data_dir/.config/UMS/UMS.conf"
|
||||||
ynh_add_config --template="WEB.conf.default" --destination="$data_dir/.config/UMS/WEB.conf"
|
ynh_add_config --template="WEB.conf.default" --destination="$data_dir/.config/UMS/WEB.conf"
|
||||||
ynh_add_config --template="VirtualFolders.conf.default" --destination="$data_dir/.config/UMS/VirtualFolders.conf"
|
ynh_add_config --template="VirtualFolders.conf.default" --destination="$data_dir/.config/UMS/VirtualFolders.conf"
|
||||||
|
|
|
@ -55,6 +55,9 @@ ynh_remove_logrotate
|
||||||
# Remove the log files
|
# Remove the log files
|
||||||
ynh_secure_remove --file="/var/log/$app"
|
ynh_secure_remove --file="/var/log/$app"
|
||||||
|
|
||||||
|
# remove the home folder
|
||||||
|
ynh_secure_remove --file="$data_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -17,9 +17,10 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$install_dir"
|
ynh_restore_file --origin_path="$install_dir"
|
||||||
|
|
||||||
|
chmod 750 "$install_dir"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R root:$app "$install_dir"
|
chown -R $app:$app "$install_dir"
|
||||||
chown root:$app "$install_dir/UMS.sh"
|
chown $app:$app "$install_dir/UMS.sh"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE DATA DIRECTORY
|
# RESTORE THE DATA DIRECTORY
|
||||||
|
@ -29,7 +30,7 @@ ynh_script_progression --message="Restoring the data directory..." --weight=1
|
||||||
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||||
|
|
||||||
# (Same as for install dir)
|
# (Same as for install dir)
|
||||||
chown -R $app:www-data "$data_dir"
|
chown -R $app:$app "$data_dir"
|
||||||
chown -R $app:$app "$data_dir/.config"
|
chown -R $app:$app "$data_dir/.config"
|
||||||
chmod -R 700 "$data_dir/.config"
|
chmod -R 700 "$data_dir/.config"
|
||||||
|
|
||||||
|
|
|
@ -68,9 +68,10 @@ then
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
chmod 750 "$install_dir"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R root:$app "$install_dir"
|
chown -R $app:$app "$install_dir"
|
||||||
chown root:$app "$install_dir/UMS.sh"
|
chown $app:$app "$install_dir/UMS.sh"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
|
Loading…
Add table
Reference in a new issue