mirror of
https://github.com/YunoHost-Apps/code-server_ynh.git
synced 2024-09-03 18:16:28 +02:00
fix permissions
This commit is contained in:
parent
205bd84c49
commit
13b88974dd
3 changed files with 8 additions and 6 deletions
|
@ -25,7 +25,7 @@ ynh_script_progression --message="Setting up source files..." --weight=5
|
|||
ynh_setup_source --dest_dir="$install_dir"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $admin:www-data "$install_dir"
|
||||
chown -R root:$admin "$install_dir"
|
||||
chmod +x "$install_dir/bin/code-server"
|
||||
|
||||
#=================================================
|
||||
|
@ -51,11 +51,11 @@ ynh_script_progression --message="Adding a configuration file..." --weight=2
|
|||
|
||||
ynh_add_config --template="config.yaml" --destination="$install_dir/config.yaml"
|
||||
chmod 440 "$install_dir/config.yaml"
|
||||
chown $admin:$admin "$install_dir/config.yaml"
|
||||
chown root:$admin "$install_dir/config.yaml"
|
||||
|
||||
ynh_add_config --template="code-server.env" --destination="$install_dir/code-server.env"
|
||||
chmod 440 "$install_dir/code-server.env"
|
||||
chown $admin:$admin "$install_dir/code-server.env"
|
||||
chown root:$admin "$install_dir/code-server.env"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
@ -70,6 +70,8 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
|
|||
#=================================================
|
||||
ynh_permission_update --permission="main" --add="$admin"
|
||||
|
||||
chown -R $admin:$admin "$data_dir"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -18,7 +18,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
|||
ynh_restore_file --origin_path="$install_dir"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $admin:www-data "$install_dir"
|
||||
chown -R root:$admin "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE DATA DIRECTORY
|
||||
|
@ -27,7 +27,7 @@ ynh_script_progression --message="Restoring the data directory..." --weight=1
|
|||
|
||||
ynh_restore_file --origin_path="$data_dir" --not_mandatory
|
||||
|
||||
chown -R $admin:www-data "$data_dir"
|
||||
chown -R $admin:$admin "$data_dir"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
|
|
|
@ -79,7 +79,7 @@ then
|
|||
fi
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $admin:www-data "$install_dir"
|
||||
chown -R root:$admin "$install_dir"
|
||||
chmod +x "$install_dir/bin/code-server"
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue