1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/code-server_ynh.git synced 2024-09-03 18:16:28 +02:00

fix datadir folder permissions

This commit is contained in:
Tagada 2023-06-27 19:00:10 +02:00
parent 94ecacf198
commit 3e2d2cff41
3 changed files with 21 additions and 7 deletions

View file

@ -57,6 +57,13 @@ ynh_add_config --template="code-server.env" --destination="$install_dir/code-ser
chmod 440 "$install_dir/code-server.env"
chown root:$admin "$install_dir/code-server.env"
#=================================================
# SET PERMISSION FOR THE USER
#=================================================
ynh_permission_update --permission="main" --add="$admin"
chown -R $admin:$admin "$data_dir"
#=================================================
# START SYSTEMD SERVICE
#=================================================
@ -65,13 +72,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
#=================================================
# SET PERMISSION FOR THE USER
#=================================================
ynh_permission_update --permission="main" --add="$admin"
chown -R $admin:$admin "$data_dir"
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -46,6 +46,13 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
yunohost service add $app --description="VS Code Server" --log="/var/log/$app/$app.log"
#=================================================
# SET PERMISSION FOR THE USER
#=================================================
ynh_permission_update --permission="main" --add="$admin"
chown -R $admin:$admin "$data_dir"
#=================================================
# START SYSTEMD SERVICE
#=================================================

View file

@ -131,6 +131,13 @@ ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --description="VS Code Server" --log="/var/log/$app/$app.log"
#=================================================
# SET PERMISSION FOR THE USER
#=================================================
ynh_permission_update --permission="main" --add="$admin"
chown -R $admin:$admin "$data_dir"
#=================================================
# START SYSTEMD SERVICE
#=================================================