1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kodi_ynh.git synced 2024-09-03 19:26:34 +02:00
This commit is contained in:
ericgaspar 2022-01-04 22:50:00 +01:00
parent 390eeb3f3a
commit 441c407267
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 5 additions and 36 deletions

View file

@ -21,7 +21,7 @@
"url": "blog.cecchettosylvain.fr" "url": "blog.cecchettosylvain.fr"
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.2.3" "yunohost": ">= 4.3.0"
}, },
"multi_instance": false, "multi_instance": false,
"services": [ "services": [

View file

@ -19,30 +19,6 @@ package_check_dependencies="xserver-xorg-video-dummy"
# EXPERIMENTAL HELPERS # EXPERIMENTAL HELPERS
#================================================= #=================================================
# Check the architecture
#
# example: architecture=$(ynh_detect_arch)
#
# usage: ynh_detect_arch
#
# Requires YunoHost version 2.2.4 or higher.
ynh_detect_arch(){
local architecture
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
architecture="arm64"
elif [ -n "$(uname -m | grep 64)" ]; then
architecture="x86-64"
elif [ -n "$(uname -m | grep 86)" ]; then
architecture="i386"
elif [ -n "$(uname -m | grep arm)" ]; then
architecture="arm"
else
architecture="unknown"
fi
echo $architecture
}
#================================================= #=================================================
# FUTURE OFFICIAL HELPERS # FUTURE OFFICIAL HELPERS
#================================================= #=================================================

View file

@ -28,7 +28,7 @@ path_url=$YNH_APP_ARG_PATH
is_public=1 is_public=1
launch_on_boot=$YNH_APP_ARG_LAUNCH_ON_BOOT launch_on_boot=$YNH_APP_ARG_LAUNCH_ON_BOOT
open_webserver_port=$YNH_APP_ARG_OPEN_WEBSERVER_PORT open_webserver_port=$YNH_APP_ARG_OPEN_WEBSERVER_PORT
arch=$(ynh_detect_arch) arch=$YNH_ARCH
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -65,10 +65,6 @@ ynh_script_progression --message="Finding an available port..."
port=$(ynh_find_port --port=8095) port=$(ynh_find_port --port=8095)
ynh_app_setting_set --app=$app --key=port --value=$port ynh_app_setting_set --app=$app --key=port --value=$port
# Optional: Expose this port publicly
# (N.B.: you only need to do this if the app actually needs to expose the port publicly.
# If you do this and the app doesn't actually need you are CREATING SECURITY HOLES IN THE SERVER !)
# Open the port # Open the port
# ynh_script_progression --message="Configuring firewall..." # ynh_script_progression --message="Configuring firewall..."
if [ "$open_webserver_port" -eq 1 ] if [ "$open_webserver_port" -eq 1 ]

View file

@ -43,7 +43,6 @@ ynh_script_progression --message="Stopping and removing the systemd service..."
# Remove the dedicated systemd config # Remove the dedicated systemd config
ynh_remove_systemd_config ynh_remove_systemd_config
#================================================= #=================================================
# REMOVE DEPENDENCIES # REMOVE DEPENDENCIES
#================================================= #=================================================
@ -68,7 +67,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..."
# Remove the dedicated NGINX config # Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config
#================================================= #=================================================
# CLOSE A PORT # CLOSE A PORT
#================================================= #=================================================

View file

@ -33,7 +33,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
launch_on_boot=$(ynh_app_setting_get --app=$app --key=launch_on_boot) launch_on_boot=$(ynh_app_setting_get --app=$app --key=launch_on_boot)
open_webserver_port=$(ynh_app_setting_get --app=$app --key=open_webserver_port) open_webserver_port=$(ynh_app_setting_get --app=$app --key=open_webserver_port)
port=$(ynh_app_setting_get --app=$app --key=port) port=$(ynh_app_setting_get --app=$app --key=port)
arch=$(ynh_detect_arch) arch=$YNH_ARCH
#================================================= #=================================================
# FIND AND OPEN A PORT # FIND AND OPEN A PORT
@ -52,8 +52,7 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Validating restoration parameters..." ynh_script_progression --message="Validating restoration parameters..."
test ! -d $final_path \ test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
|| ynh_die --message="There is already a directory: $final_path "
#================================================= #=================================================
# STANDARD RESTORATION STEPS # STANDARD RESTORATION STEPS

View file

@ -22,7 +22,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
launch_on_boot=$(ynh_app_setting_get --app=$app --key=launch_on_boot) launch_on_boot=$(ynh_app_setting_get --app=$app --key=launch_on_boot)
open_webserver_port=$(ynh_app_setting_get --app=$app --key=open_webserver_port) open_webserver_port=$(ynh_app_setting_get --app=$app --key=open_webserver_port)
port=$(ynh_app_setting_get --app=$app --key=port) port=$(ynh_app_setting_get --app=$app --key=port)
arch=$(ynh_detect_arch) arch=$YNH_ARCH
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION