mirror of
https://github.com/YunoHost-Apps/plume_ynh.git
synced 2024-09-03 20:15:54 +02:00
Fix: name can't be an install question anymore
This commit is contained in:
parent
d1ddd26060
commit
244b50a859
4 changed files with 17 additions and 8 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue