mirror of
https://github.com/YunoHost-Apps/syncthing_ynh.git
synced 2024-09-03 20:26:23 +02:00
cleaning
This commit is contained in:
parent
4381a85417
commit
534e77b5e8
3 changed files with 10 additions and 10 deletions
|
@ -70,7 +70,7 @@ ynh_store_file_checksum --file="$config_file"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
yunohost service add $app --description="$app daemon for Syncthing" --needs_exposed_ports=$port
|
yunohost service add $app --description="Continuous File Synchronization" --needs_exposed_ports=$port
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
|
@ -41,7 +41,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||||
systemctl enable $app.service --quiet
|
systemctl enable $app.service --quiet
|
||||||
|
|
||||||
yunohost service add $app --description="$app daemon for Syncthing" --needs_exposed_ports=$port
|
yunohost service add $app --description="Continuous File Synchronization" --needs_exposed_ports=$port
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
|
|
@ -33,7 +33,7 @@ then
|
||||||
ynh_script_progression --message="Upgrading source files..."
|
ynh_script_progression --message="Upgrading source files..."
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir" --keep=".config/syncthing/config.xml"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
|
@ -50,18 +50,18 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE A CONFIG FILE
|
# UPDATE A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating a configuration file..."
|
#ynh_script_progression --message="Updating a configuration file..."
|
||||||
|
|
||||||
config_file="$install_dir/.config/syncthing/config.xml"
|
#config_file="$install_dir/.config/syncthing/config.xml"
|
||||||
|
|
||||||
ynh_backup_if_checksum_is_different --file="$config_file"
|
#ynh_backup_if_checksum_is_different --file="$config_file"
|
||||||
# Recalculate and store the checksum of the file for the next upgrade.
|
# Recalculate and store the checksum of the file for the next upgrade.
|
||||||
ynh_store_file_checksum --file="$config_file"
|
#ynh_store_file_checksum --file="$config_file"
|
||||||
|
|
||||||
#ynh_add_config --template="../conf/config.xml" --destination="$config_file"
|
#ynh_add_config --template="../conf/config.xml" --destination="$config_file"
|
||||||
|
|
||||||
chmod 400 "$config_file"
|
#chmod 400 "$config_file"
|
||||||
chown $app:$app "$config_file"
|
#chown $app:$app "$config_file"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
|
@ -78,7 +78,7 @@ ynh_add_systemd_config
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..."
|
ynh_script_progression --message="Integrating service in YunoHost..."
|
||||||
|
|
||||||
yunohost service add $app --description="$app daemon for Syncthing" --needs_exposed_ports=$port
|
yunohost service add $app --description="Continuous File Synchronization" --needs_exposed_ports=$port
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
|
|
Loading…
Add table
Reference in a new issue