mirror of
https://github.com/YunoHost-Apps/code-server_ynh.git
synced 2024-09-03 18:16:28 +02:00
permissions
This commit is contained in:
parent
79a0867493
commit
b93847ff37
3 changed files with 1 additions and 27 deletions
|
@ -56,10 +56,10 @@ ram.runtime = "100M"
|
|||
[resources.system_user]
|
||||
|
||||
[resources.install_dir]
|
||||
dir = "/opt/yunohost/__APP__"
|
||||
|
||||
[resources.data_dir]
|
||||
subdirs = ["user-data", "extensions"]
|
||||
|
||||
[resources.permissions]
|
||||
main.url = "/"
|
||||
main.allowed = "admins"
|
||||
|
|
|
@ -57,13 +57,6 @@ 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
|
||||
#=================================================
|
||||
|
|
|
@ -114,30 +114,11 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
|
|||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# SETUP LOGROTATE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
|
||||
|
||||
# Use logrotate to manage app-specific logfile(s)
|
||||
ynh_use_logrotate --non-append
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue