1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/plume_ynh.git synced 2024-09-03 20:15:54 +02:00
This commit is contained in:
Salamandar 2024-06-27 21:55:51 +00:00 committed by GitHub
commit a9ba817e17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 22 additions and 9 deletions

View file

@ -40,7 +40,7 @@ ram.runtime = "50M"
[install.password]
type = "password"
[install.name]
[install.instance_name]
ask.en = "Choose a name for your Plume instance"
ask.fr = "Choisissez un nom pour votre instance Plume"
type = "string"
@ -71,7 +71,11 @@ ram.runtime = "50M"
main.url = "/"
[resources.apt]
packages = "postgresql postgresql-contrib"
packages = [
"postgresql",
"postgresql-contrib",
"libssl1.1",
]
[resources.database]
type = "postgresql"

View file

@ -81,10 +81,10 @@ chown $app:$app "$install_dir/$app/.env"
#=================================================
ynh_script_progression --message="Making setup..."
# Set right permissions
# Set right permissions
chown -R "$app":"$app" $install_dir
export PATH="$PATH:$install_dir/.cargo/bin:$install_dir/.local/bin:/usr/local/sbin"
export PATH="$PATH:$install_dir/.cargo/bin:$install_dir/.local/bin:/usr/local/sbin"
pushd $install_dir/$app
sudo -u "$app" env PATH=$PATH plm migration run
@ -92,7 +92,7 @@ pushd $install_dir/$app
# Add new instance
if [ $registration -eq 1 ]
then
sudo -u "$app" env PATH=$PATH plm instance new --domain "$domain" --name "$name" -l 'CC-BY'
sudo -u "$app" env PATH=$PATH plm instance new --domain "$domain" --name "$instance_name" -l 'CC-BY'
else
sudo -u "$app" env PATH=$PATH plm instance new --private --domain "$domain" --name "$name" -l 'CC-BY'
fi

View file

@ -24,6 +24,15 @@ ynh_script_progression --message="Stopping a systemd service..."
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" --line_match="Stopped plume"
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
if [ -z "$instance_name" ]; then
ynh_app_setting_set --app="$app" --key="instance_name" --value="$name"
fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -79,11 +88,11 @@ chown $app:$app "$install_dir/$app/.env"
#=================================================
ynh_script_progression --message="Making setup..."
export PATH="$PATH:$install_dir/.cargo/bin:$install_dir/.local/bin:/usr/local/sbin"
export PATH="$PATH:$install_dir/.cargo/bin:$install_dir/.local/bin:/usr/local/sbin"
pushd $install_dir/$app
sudo -u "$app" env PATH=$PATH plm migration run
popd
popd
#=================================================
# SETUP SYSTEMD

View file

@ -6,8 +6,8 @@ test_format = 1.0
# Default args to use for install
# -------------------------------
args.name="my blog"
args.registration=0
args.instance_name="my blog"
args.registration=0
# -------------------------------
# Commits to test upgrade from