1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/streama_ynh.git synced 2024-09-03 20:26:30 +02:00

set user before install source

This commit is contained in:
ericgaspar 2021-03-21 23:10:03 +01:00
parent 5217f5cdd3
commit 82eaf1527c
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 24 additions and 16 deletions

View file

@ -64,6 +64,14 @@ ynh_print_info "Installing dependencies..."
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -81,14 +89,6 @@ ynh_script_progression --message="Configuring NGNX web server..." --weight=3
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user
ynh_system_user_create --username=$app
#=================================================
# SETUP SYSTEMD
#=================================================

View file

@ -48,20 +48,20 @@ test ! -d "$final_path" \
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring Streama main directory..." --weight=2
ynh_restore_file --origin_path="$final_path"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=3
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring Streama main directory..." --weight=2
ynh_restore_file --origin_path="$final_path"
#=================================================
# INSTALL DEPENDENCIES

View file

@ -62,6 +62,14 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=20
ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log"
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================