1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/distbin_ynh.git synced 2024-09-03 18:26:10 +02:00

Fix rights

This commit is contained in:
yalh76 2021-04-11 20:18:30 +02:00
parent 9464b0504d
commit 9f4e215896
3 changed files with 19 additions and 23 deletions

View file

@ -86,7 +86,7 @@ ynh_setup_source --dest_dir="$final_path"
chmod 750 "$final_path" chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R root:$app "$final_path" chown -R $app:$app "$final_path"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
@ -120,8 +120,6 @@ mkdir -p "$final_path/distbin-db/inbox"
#================================================= #=================================================
ynh_script_progression --message="Installing Distbin..." ynh_script_progression --message="Installing Distbin..."
chown -R "$app":"$app" "$final_path"
pushd $final_path pushd $final_path
ynh_use_nodejs ynh_use_nodejs
ynh_exec_warn_less sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts ynh_exec_warn_less sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts
@ -133,14 +131,6 @@ pushd $final_path/dist
ynh_exec_warn_less sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts --production ynh_exec_warn_less sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts --production
popd popd
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..."
# Create a dedicated systemd config
ynh_add_systemd_config
#================================================= #=================================================
# ADD A CONFIGURATION # ADD A CONFIGURATION
#================================================= #=================================================
@ -151,6 +141,14 @@ ynh_add_config --template="../conf/.env" --destination="$final_path/.env"
chmod 400 "$final_path/.env" chmod 400 "$final_path/.env"
chown $app:$app "$final_path/.env" chown $app:$app "$final_path/.env"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..."
# Create a dedicated systemd config
ynh_add_systemd_config
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================

View file

@ -67,7 +67,7 @@ ynh_restore_file --origin_path="$final_path"
chmod 750 "$final_path" chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R root:$app "$final_path" chown -R $app:$app "$final_path"
#================================================= #=================================================
# CREATE LOG FOLDER # CREATE LOG FOLDER

View file

@ -86,7 +86,7 @@ fi
chmod 750 "$final_path" chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R root:$app "$final_path" chown -R $app:$app "$final_path"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
@ -130,8 +130,6 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Making upgrade..." ynh_script_progression --message="Making upgrade..."
chown -R "$app":"$app" "$final_path"
pushd $final_path pushd $final_path
ynh_use_nodejs ynh_use_nodejs
ynh_exec_warn_less sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts ynh_exec_warn_less sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts
@ -143,14 +141,6 @@ pushd $final_path/dist
ynh_exec_warn_less sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts --production ynh_exec_warn_less sudo -u $app $ynh_node_load_PATH $ynh_npm install --ignore-scripts --production
popd popd
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..."
# Create a dedicated systemd config
ynh_add_systemd_config
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE
#================================================= #=================================================
@ -161,6 +151,14 @@ ynh_add_config --template="../conf/.env" --destination="$final_path/.env"
chmod 400 "$final_path/.env" chmod 400 "$final_path/.env"
chown $app:$app "$final_path/.env" chown $app:$app "$final_path/.env"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..."
# Create a dedicated systemd config
ynh_add_systemd_config
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#================================================= #=================================================