mirror of
https://github.com/YunoHost-Apps/syncthing_ynh.git
synced 2024-09-03 20:26:23 +02:00
Fix rights
This commit is contained in:
parent
5b79996c88
commit
72127a93bc
3 changed files with 25 additions and 22 deletions
|
@ -91,7 +91,7 @@ ynh_setup_source --dest_dir="$final_path" --source_id=$architecture
|
|||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R root:$app "$final_path"
|
||||
chown -R $app:$app "$final_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
@ -112,15 +112,7 @@ ynh_script_progression --message="Creating sync directory..."
|
|||
mkdir -p "$sync_home"
|
||||
chmod 750 "$sync_home"
|
||||
chmod -R o-rwx "$sync_home"
|
||||
chown -R root:$app "$sync_home"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring a systemd service..."
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
chown -R $app:$app "$sync_home"
|
||||
|
||||
#=================================================
|
||||
# ADD A CONFIGURATION
|
||||
|
@ -134,6 +126,14 @@ ynh_add_config --template="../conf/config.xml" --destination="$config_file"
|
|||
chmod 400 "$config_file"
|
||||
chown $app:$app "$config_file"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring a systemd service..."
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# FIX LISTENING SERVICE
|
||||
#=================================================
|
||||
|
|
|
@ -77,7 +77,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"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
|
@ -93,7 +93,7 @@ ynh_restore_file --origin_path="$sync_home" --not_mandatory
|
|||
mkdir -p "$sync_home"
|
||||
chmod 750 "$sync_home"
|
||||
chmod -R o-rwx "$sync_home"
|
||||
chown -R root:$app "$sync_home"
|
||||
chown -R $app:$app "$sync_home"
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEMD
|
||||
|
|
|
@ -143,7 +143,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
|
||||
|
@ -164,15 +164,7 @@ ynh_script_progression --message="Creating sync directory..."
|
|||
mkdir -p "$sync_home"
|
||||
chmod 750 "$sync_home"
|
||||
chmod -R o-rwx "$sync_home"
|
||||
chown -R root:$app "$sync_home"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading systemd configuration..."
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
chown -R $app:$app "$sync_home"
|
||||
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
|
@ -185,6 +177,17 @@ ynh_backup_if_checksum_is_different --file="$config_file"
|
|||
# Recalculate and store the checksum of the file for the next upgrade.
|
||||
ynh_store_file_checksum --file="$config_file"
|
||||
|
||||
chmod 400 "$config_file"
|
||||
chown $app:$app "$config_file"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading systemd configuration..."
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue