1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/misskey_ynh.git synced 2024-09-03 19:46:03 +02:00
This commit is contained in:
ericgaspar 2021-05-15 17:46:44 +02:00
parent b05cedd565
commit a8d0b5f86c
3 changed files with 10 additions and 33 deletions

View file

@ -13,7 +13,7 @@
"name": "Anmol" "name": "Anmol"
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.0.0" "yunohost": ">= 4.2.4"
}, },
"multi_instance": true, "multi_instance": true,
"services": ["nginx"], "services": ["nginx"],
@ -22,19 +22,11 @@
{ {
"name": "domain", "name": "domain",
"type": "domain", "type": "domain",
"ask": {
"en": "Choose a domain name for Misskey",
"fr": "Choisissez un nom de domaine pour Misskey"
},
"example": "example.com" "example": "example.com"
}, },
{ {
"name": "is_public", "name": "is_public",
"type": "boolean", "type": "boolean",
"ask": {
"en": "Is it a public application?",
"fr": "Est-ce une application publique ?"
},
"help": { "help": {
"en": "If enabled, Misskey will be accessible by people who do not have an account. This can be changed later via the webadmin.", "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 nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." "fr": "Si cette case est cochée, Misskey sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."

View file

@ -140,8 +140,6 @@ ynh_add_systemd_config
ynh_add_config --template="../conf/default.yml" --destination="$final_path/.config/default.yml" 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 # INSTALLING MISKKEY
#================================================= #=================================================

View file

@ -120,18 +120,18 @@ ynh_system_user_create --username=$app
#================================================= #=================================================
# ADD SWAP IF NEEDED # 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) # total_memory=$(ynh_get_ram --total)
swap_needed=0 # swap_needed=0
if [ $total_memory -lt $MEMORY_NEEDED ]; then # if [ $total_memory -lt $MEMORY_NEEDED ]; then
# Need a minimum of 8Go of memory # # Need a minimum of 8Go of memory
swap_needed=$(($MEMORY_NEEDED - $total_memory)) # swap_needed=$(($MEMORY_NEEDED - $total_memory))
fi # fi
ynh_script_progression --message="Adding $swap_needed Mo to swap..." # ynh_script_progression --message="Adding $swap_needed Mo to swap..."
ynh_add_swap --size=$swap_needed # ynh_add_swap --size=$swap_needed
#================================================= #=================================================
# SPECIFIC UPGRADE # 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_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 # Updating process MISSKEY
#================================================= #=================================================
@ -159,17 +157,6 @@ ynh_script_progression --message="Upgrading systemd configuration..."
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_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 # GENERIC FINALIZATION
#================================================= #=================================================