mirror of
https://github.com/YunoHost-Apps/gancio_ynh.git
synced 2024-09-03 20:36:19 +02:00
Merge branch 'testing' into 1.16.0
This commit is contained in:
commit
4cc422cd4c
3 changed files with 17 additions and 6 deletions
|
@ -64,12 +64,12 @@ chown $app:$app "$install_dir/config.json"
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL YARN AND APP
|
# INSTALL YARN AND APP
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing app dependencies and creating admin user..." --weight=15
|
ynh_script_progression --message="Installing app dependencies..." --weight=15
|
||||||
|
|
||||||
pushd $install_dir
|
pushd $install_dir
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install
|
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install # Install dependencies
|
||||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH ./server/cli.js users create $mail $password admin --config ./config.json
|
#ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -80,7 +80,18 @@ popd
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
# Start a systemd service
|
# Start a systemd service
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
# It also initializes the database to allow creating the admin user
|
||||||
|
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="START TASK MANAGER" --timeout=30
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# CREATING ADMIN USER
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Creating admin user..." --weight=15
|
||||||
|
|
||||||
|
pushd $install_dir
|
||||||
|
admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH ./server/cli.js users create $admin_mail $password admin --config ./config.json
|
||||||
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -73,7 +73,7 @@ yunohost service add $app --description="Federated shared agenda for local commu
|
||||||
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
||||||
|
|
||||||
# Typically you only have either $app or php-fpm but not both at the same time...
|
# Typically you only have either $app or php-fpm but not both at the same time...
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="START TASK MANAGER" --timeout=30
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -75,7 +75,7 @@ popd
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="START TASK MANAGER" --timeout=30
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
Loading…
Reference in a new issue