mirror of
https://github.com/YunoHost-Apps/pleroma_ynh.git
synced 2024-09-03 20:15:59 +02:00
Apply example_ynh
This commit is contained in:
parent
cbe701b3d7
commit
19acfac547
5 changed files with 8 additions and 11 deletions
|
@ -44,10 +44,6 @@
|
|||
{
|
||||
"name": "password",
|
||||
"type": "password",
|
||||
"ask": {
|
||||
"en": "Set the administrator password",
|
||||
"fr": "Définissez le mot de passe administrateur"
|
||||
},
|
||||
"example": "Choose a password"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -236,14 +236,12 @@ pushd $final_path/$app
|
|||
su "$app" -s $SHELL -lc "$final_path/$app/bin/pleroma_ctl user new $admin $admin_email --password $password --moderator --admin -y"
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# STORE THE CONFIG FILE CHECKSUM
|
||||
#=================================================
|
||||
ynh_script_progression --message="Storing the config file checksum..."
|
||||
|
||||
# Calculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum --file="$config"
|
||||
|
||||
chmod 400 "$config"
|
||||
chown $app:$app "$config"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -59,7 +59,7 @@ ynh_remove_systemd_config
|
|||
ynh_script_progression --message="Removing the PostgreSQL database..."
|
||||
|
||||
# Remove a database if it exists, along with the associated user
|
||||
ynh_psql_remove_db --db_user="$db_user" --db_name="$db_name"
|
||||
ynh_psql_remove_db --db_user=$db_user --db_name=$db_name
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
|
|
|
@ -107,6 +107,9 @@ ynh_script_progression --message="Restoring the config file..."
|
|||
|
||||
ynh_restore_file --origin_path="/etc/$app/config.exs"
|
||||
|
||||
chmod 400 "/etc/$app/config.exs"
|
||||
chown $app:$app "/etc/$app/config.exs"
|
||||
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
|
|
|
@ -95,7 +95,7 @@ abort_if_up_to_date
|
|||
previous_version="${version}"
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..."
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue