mirror of
https://github.com/YunoHost-Apps/zeronet_ynh.git
synced 2024-09-03 17:46:12 +02:00
fix linter
This commit is contained in:
parent
2912924e86
commit
a6b6e8abca
6 changed files with 19 additions and 19 deletions
|
@ -3,5 +3,4 @@ SOURCE_SUM=9286971422470cedb8ca5f6675863816bf3f05f0769842a1bdc12f85fc594938
|
|||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=
|
||||
SOURCE_EXTRACT=true
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Decentralized websites using Bitcoin crypto and BitTorrent network",
|
||||
"fr": "Sites Web décentralisés utilisant la crypto Bitcoin et le réseau BitTorrent"
|
||||
},
|
||||
"version": "2021-01-25~ynh1",
|
||||
"version": "2021.01.25~ynh1",
|
||||
"url": "https://zeronet.io",
|
||||
"license": "AGPL-3.0",
|
||||
"maintainer": {
|
||||
|
@ -14,7 +14,7 @@
|
|||
"email": "whypsi@riseup.net"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.1.7.3"
|
||||
"yunohost": ">= 4.3.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
@ -24,22 +24,12 @@
|
|||
"install" : [
|
||||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"ask": {
|
||||
"en": "Choose a sub domain name for ZeroNet",
|
||||
"fr": "Choisissez un nom de domaine pour ZeroNet"
|
||||
},
|
||||
"example": "zeronet.domain.tld"
|
||||
"type": "domain"
|
||||
},
|
||||
{
|
||||
"name": "password",
|
||||
"type": "password",
|
||||
"optional": true,
|
||||
"ask": {
|
||||
"en": "Set the password for the Zeronet.",
|
||||
"fr": "Définissez le mot de passe pour votre Zeronet."
|
||||
},
|
||||
"example": "myreallystrengthpassword"
|
||||
"optional": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -56,7 +56,7 @@ ynh_app_setting_set --app=$app --key=password --value=$password
|
|||
#=================================================
|
||||
# FIND AND OPEN A PORT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring firewall..."
|
||||
ynh_script_progression --message="Finding an available port..."
|
||||
|
||||
# Find an available port
|
||||
port=$(ynh_find_port --port=43110)
|
||||
|
|
|
@ -59,6 +59,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 data directory if --purge option is used
|
||||
if [ "${YNH_APP_PURGE:-0}" -eq 1 ]
|
||||
then
|
||||
ynh_script_progression --message="Removing app data directory..." --weight=1
|
||||
ynh_secure_remove --file="$datadir"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -39,8 +39,6 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir)
|
|||
#=================================================
|
||||
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 "
|
||||
|
||||
|
@ -98,9 +96,10 @@ popd
|
|||
ynh_script_progression --message="Restoring various files..."
|
||||
|
||||
# Restore permissions on app files
|
||||
ynh_restore_file --origin_path="$datadir"
|
||||
ynh_restore_file --origin_path="$datadir" --not_mandatory
|
||||
|
||||
mkdir -p "$datadir"
|
||||
|
||||
chmod 750 "$datadir"
|
||||
chmod -R o-rwx "$datadir"
|
||||
chown -R $app:$app "$datadir"
|
||||
|
|
Loading…
Reference in a new issue