1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/plume_ynh.git synced 2024-09-03 20:15:54 +02:00

Fix rights

This commit is contained in:
yalh76 2021-04-11 20:59:37 +02:00
parent 44bdff9beb
commit 6af3413a8a
3 changed files with 19 additions and 22 deletions

View file

@ -130,7 +130,7 @@ ynh_secure_remove --file="$final_path/$app/bin/"
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R root:$app "$final_path"
chown -R $app:$app "$final_path"
#=================================================
# NGINX CONFIGURATION
@ -177,14 +177,6 @@ pushd $final_path/$app
sudo -u "$app" env PATH=$PATH plm search init -p $final_path/$app
popd
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..."
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# ADD A CONFIGURATION
#=================================================
@ -195,6 +187,14 @@ ynh_add_config --template="../conf/.env" --destination="$final_path/$app/.env"
chmod 400 "$final_path/$app/.env"
chown $app:$app "$final_path/$app/.env"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..."
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

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

View file

@ -118,7 +118,7 @@ fi
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R root:$app "$final_path"
chown -R $app:$app "$final_path"
#=================================================
# NGINX CONFIGURATION
@ -150,23 +150,12 @@ chown -R "$app":"$app" "/var/log/$app"
#=================================================
ynh_script_progression --message="Making setup..."
# Set right permissions
chown -R "$app":"$app" $final_path
export PATH="$PATH:$final_path/.cargo/bin:$final_path/.local/bin:/usr/local/sbin"
pushd $final_path/$app
sudo -u "$app" env PATH=$PATH plm migration run
popd
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..."
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# UPDATE A CONFIG FILE
#=================================================
@ -177,6 +166,14 @@ ynh_add_config --template="../conf/.env" --destination="$final_path/$app/.env"
chmod 400 "$final_path/$app/.env"
chown $app:$app "$final_path/$app/.env"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..."
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================