mirror of
https://github.com/YunoHost-Apps/syncthing_ynh.git
synced 2024-09-03 20:26:23 +02:00
Merge pull request #101 from YunoHost-Apps/Remove-arch-helper
Remove arch helper
This commit is contained in:
commit
5b45efc4d1
10 changed files with 26 additions and 33 deletions
4
.github/workflows/updater.sh
vendored
4
.github/workflows/updater.sh
vendored
|
@ -64,7 +64,7 @@ echo "Handling asset at $asset_url"
|
|||
# Leave $src empty to ignore the asset
|
||||
case $asset_url in
|
||||
*"linux-arm-"*)
|
||||
src="arm"
|
||||
src="armhf"
|
||||
;;
|
||||
*"linux-arm64-"*)
|
||||
src="arm64"
|
||||
|
@ -73,7 +73,7 @@ case $asset_url in
|
|||
src="i386"
|
||||
;;
|
||||
*"linux-amd64-"*)
|
||||
src="x86-64"
|
||||
src="amd64"
|
||||
;;
|
||||
*)
|
||||
src=""
|
||||
|
|
|
@ -12,13 +12,13 @@
|
|||
setup_public=1
|
||||
upgrade=1
|
||||
# 1.1.1
|
||||
upgrade=1 from_commit=571623f6ea0dc6310a8d6b991b03c4a84337ce92
|
||||
#upgrade=1 from_commit=571623f6ea0dc6310a8d6b991b03c4a84337ce92
|
||||
# 1.3.3
|
||||
upgrade=1 from_commit=2b2b346b2d154653ff2affb5679a7cd8d60892fa
|
||||
#upgrade=1 from_commit=2b2b346b2d154653ff2affb5679a7cd8d60892fa
|
||||
# 1.4.0
|
||||
upgrade=1 from_commit=cfd8f2894d381f0b1149b1061dff695c0941fcc3
|
||||
#upgrade=1 from_commit=cfd8f2894d381f0b1149b1061dff695c0941fcc3
|
||||
# 1.4.2
|
||||
upgrade=1 from_commit=a351c2b6431a3ac092f3581a9778a402ec81f963
|
||||
#upgrade=1 from_commit=a351c2b6431a3ac092f3581a9778a402ec81f963
|
||||
# 1.5.0~ynh1
|
||||
#upgrade=1 from_commit=91793d91bca31838cbb97782a633d3732e178b8a
|
||||
# 1.6.1~ynh1
|
||||
|
@ -42,11 +42,11 @@
|
|||
# 1.16.1~ynh1
|
||||
#upgrade=1 from_commit=a1a1134571e6f9d274b6772358bedfb4b775fe5a
|
||||
# 1.17.0~ynh1
|
||||
upgrade=1 from_commit=3d2f2de9824f4e76c506bb587e4167255ff5f900
|
||||
#upgrade=1 from_commit=3d2f2de9824f4e76c506bb587e4167255ff5f900
|
||||
# 1.18.0~ynh1
|
||||
upgrade=1 from_commit=ba40babc2a4dce4557fc57ab0dd19dc49a70f637
|
||||
#upgrade=1 from_commit=ba40babc2a4dce4557fc57ab0dd19dc49a70f637
|
||||
# 1.18.1~ynh1
|
||||
upgrade=1 from_commit=3e69fac2078f96ba5a4cb73966345f44a95147bf
|
||||
#upgrade=1 from_commit=3e69fac2078f96ba5a4cb73966345f44a95147bf
|
||||
# 1.18.2~ynh1
|
||||
upgrade=1 from_commit=f0cfbbfd9acf04d7df4d2b7c6c6f80da4db04f24
|
||||
backup_restore=1
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
}
|
||||
],
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.1.3"
|
||||
"yunohost": ">= 4.3.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
@ -35,8 +35,7 @@
|
|||
"install": [
|
||||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"example": "example.com"
|
||||
"type": "domain"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
|
@ -46,8 +45,7 @@
|
|||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user",
|
||||
"example": "johndoe"
|
||||
"type": "user"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source ynh_detect_arch__2
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
@ -27,6 +26,7 @@ ynh_abort_if_errors
|
|||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url=$YNH_APP_ARG_PATH
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
architecture=$YNH_ARCH
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
sync_home=$(ynh_app_setting_get --app=$app --key=sync_home)
|
||||
|
||||
sync_port=$(ynh_app_setting_get --app=$app --key=sync_port)
|
||||
|
||||
|
@ -50,6 +51,17 @@ ynh_script_progression --message="Removing app main directory..."
|
|||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
||||
#=================================================
|
||||
# REMOVE DATA DIR
|
||||
#=================================================
|
||||
|
||||
# Remove the app data directory with the command `yunohost app remove syncthing --purge`
|
||||
if [ "${YNH_APP_PURGE:-0}" -eq 1 ]
|
||||
then
|
||||
ynh_script_progression --message="Removing $app data directory..." --weight=2
|
||||
ynh_secure_remove --file="$sync_home"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -38,8 +38,6 @@ sync_port=$(ynh_app_setting_get --app=$app --key=sync_port)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..."
|
||||
|
||||
ynh_webpath_available --domain=$domain --path_url=$path_url \
|
||||
|| ynh_die --message="Path not available: ${domain}${path_url}"
|
||||
test ! -d $final_path \
|
||||
|| ynh_die --message="There is already a directory: $final_path "
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source ynh_detect_arch__2
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
@ -20,6 +19,7 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
architecture=$YNH_ARCH
|
||||
|
||||
sync_home=$(ynh_app_setting_get --app=$app --key=sync_home)
|
||||
sync_port=$(ynh_app_setting_get --app=$app --key=sync_port)
|
||||
|
@ -100,7 +100,6 @@ if [ -z $gui_port ]; then
|
|||
ynh_remove_logrotate
|
||||
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
fi
|
||||
|
||||
# Cleaning legacy permissions
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
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
|
||||
ynh_die "Unable to detect your achitecture, please open a bug describing \
|
||||
your hardware and the result of the command \"uname -m\"." 1
|
||||
fi
|
Loading…
Add table
Reference in a new issue