mirror of
https://github.com/YunoHost-Apps/mobilizon_ynh.git
synced 2024-09-03 19:46:19 +02:00
reorg the finalization step
This commit is contained in:
parent
9ae02e08bf
commit
ab9a4e837b
1 changed files with 14 additions and 11 deletions
|
@ -87,17 +87,7 @@ ynh_secure_remove --file="$install_dir/uploads.exs"
|
||||||
chmod 400 "$MOBILIZON_CONFIG_PATH"
|
chmod 400 "$MOBILIZON_CONFIG_PATH"
|
||||||
chown "$app:$app" "$MOBILIZON_CONFIG_PATH"
|
chown "$app:$app" "$MOBILIZON_CONFIG_PATH"
|
||||||
|
|
||||||
pushd "$install_dir/live"
|
ynh_exec_as "$app" MOBILIZON_CONFIG_PATH="$MOBILIZON_CONFIG_PATH" "$install_dir/live/bin/mobilizon_ctl" migrate
|
||||||
ynh_exec_as "$app" MOBILIZON_CONFIG_PATH="$MOBILIZON_CONFIG_PATH" ./bin/mobilizon_ctl migrate
|
|
||||||
|
|
||||||
# ynh_systemd_action --service_name="$app" --action="start" --log_path=systemd --line_match="Access Mobilizon.Web.Endpoint at"
|
|
||||||
|
|
||||||
# We generate a dummy password ... this will actually *not* be used because the admin is supposed to connect via the ldap
|
|
||||||
password=$(ynh_string_random --length=30)
|
|
||||||
ynh_exec_as "$app" MOBILIZON_CONFIG_PATH="$MOBILIZON_CONFIG_PATH" ./bin/mobilizon_ctl users.new "$admin_email" --admin --password "$password"
|
|
||||||
|
|
||||||
# ynh_systemd_action --service_name="$app" --action="stop" --log_path=systemd
|
|
||||||
popd
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SYSTEM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
|
@ -111,6 +101,19 @@ ynh_add_nginx_config
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
yunohost service add "$app" --description="$app daemon for Mobilizon"
|
yunohost service add "$app" --description="$app daemon for Mobilizon"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SETUP APPLICATION
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Finalizing installation..." --weight=1
|
||||||
|
|
||||||
|
ynh_systemd_action --service_name="$app" --action="start" --log_path=systemd --line_match="Access Mobilizon.Web.Endpoint at"
|
||||||
|
|
||||||
|
# We generate a dummy password ... this will actually *not* be used because the admin is supposed to connect via the ldap
|
||||||
|
ynh_exec_as "$app" MOBILIZON_CONFIG_PATH="$MOBILIZON_CONFIG_PATH" "$install_dir/live/bin/mobilizon_ctl" \
|
||||||
|
users.new "$admin_email" --admin --password "$(ynh_string_random --length=30)"
|
||||||
|
|
||||||
|
ynh_systemd_action --service_name="$app" --action="stop" --log_path=systemd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue