mirror of
https://github.com/YunoHost-Apps/misskey_ynh.git
synced 2024-09-03 19:46:03 +02:00
Fix
This commit is contained in:
parent
b05cedd565
commit
a8d0b5f86c
3 changed files with 10 additions and 33 deletions
|
@ -13,7 +13,7 @@
|
|||
"name": "Anmol"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.0.0"
|
||||
"yunohost": ">= 4.2.4"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": ["nginx"],
|
||||
|
@ -22,19 +22,11 @@
|
|||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"ask": {
|
||||
"en": "Choose a domain name for Misskey",
|
||||
"fr": "Choisissez un nom de domaine pour Misskey"
|
||||
},
|
||||
"example": "example.com"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Is it a public application?",
|
||||
"fr": "Est-ce une application publique ?"
|
||||
},
|
||||
"help": {
|
||||
"en": "If enabled, Misskey will be accessible by people who do not have an account. This can be changed later via the webadmin.",
|
||||
"fr": "Si cette case est cochée, Misskey sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
|
||||
|
|
|
@ -140,8 +140,6 @@ ynh_add_systemd_config
|
|||
|
||||
ynh_add_config --template="../conf/default.yml" --destination="$final_path/.config/default.yml"
|
||||
|
||||
ynh_store_file_checksum --file="$final_path/.config/default.yml"
|
||||
|
||||
#=================================================
|
||||
# INSTALLING MISKKEY
|
||||
#=================================================
|
||||
|
|
|
@ -120,18 +120,18 @@ ynh_system_user_create --username=$app
|
|||
#=================================================
|
||||
# ADD SWAP IF NEEDED
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adding swap if needed..."
|
||||
# ynh_script_progression --message="Adding swap if needed..."
|
||||
|
||||
total_memory=$(ynh_get_ram --total)
|
||||
swap_needed=0
|
||||
# total_memory=$(ynh_get_ram --total)
|
||||
# swap_needed=0
|
||||
|
||||
if [ $total_memory -lt $MEMORY_NEEDED ]; then
|
||||
# Need a minimum of 8Go of memory
|
||||
swap_needed=$(($MEMORY_NEEDED - $total_memory))
|
||||
fi
|
||||
# if [ $total_memory -lt $MEMORY_NEEDED ]; then
|
||||
# # Need a minimum of 8Go of memory
|
||||
# swap_needed=$(($MEMORY_NEEDED - $total_memory))
|
||||
# fi
|
||||
|
||||
ynh_script_progression --message="Adding $swap_needed Mo to swap..."
|
||||
ynh_add_swap --size=$swap_needed
|
||||
# ynh_script_progression --message="Adding $swap_needed Mo to swap..."
|
||||
# ynh_add_swap --size=$swap_needed
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
|
@ -139,8 +139,6 @@ ynh_add_swap --size=$swap_needed
|
|||
|
||||
ynh_add_config --template="../conf/default.yml" --destination="$final_path/.config/default.yml"
|
||||
|
||||
ynh_store_file_checksum --file="$final_path/.config/default.yml"
|
||||
|
||||
#=================================================
|
||||
# Updating process MISSKEY
|
||||
#=================================================
|
||||
|
@ -159,17 +157,6 @@ ynh_script_progression --message="Upgrading systemd configuration..."
|
|||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
|
||||
ynh_backup_if_checksum_is_different --file="$config"
|
||||
|
||||
ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$final_path/.config/default.yml.backup"
|
||||
|
||||
# Recalculate and store the checksum of the file for the next upgrade.
|
||||
ynh_store_file_checksum --file="$config"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue