mirror of
https://github.com/YunoHost-Apps/syncthing_ynh.git
synced 2024-09-03 20:26:23 +02:00
Fix listening port
This commit is contained in:
parent
a627c25e9f
commit
556ea4d787
2 changed files with 46 additions and 2 deletions
|
@ -10,7 +10,39 @@
|
|||
</ldap>
|
||||
<options>
|
||||
<listenAddress>default</listenAddress>
|
||||
<globalAnnounceServer>default</globalAnnounceServer>
|
||||
<globalAnnounceEnabled>true</globalAnnounceEnabled>
|
||||
<localAnnounceEnabled>true</localAnnounceEnabled>
|
||||
<maxSendKbps>0</maxSendKbps>
|
||||
<maxRecvKbps>0</maxRecvKbps>
|
||||
<reconnectionIntervalS>60</reconnectionIntervalS>
|
||||
<relaysEnabled>true</relaysEnabled>
|
||||
<relayReconnectIntervalM>10</relayReconnectIntervalM>
|
||||
<startBrowser>true</startBrowser>
|
||||
<natEnabled>false</natEnabled>
|
||||
<natLeaseMinutes>0</natLeaseMinutes>
|
||||
<natRenewalMinutes>0</natRenewalMinutes>
|
||||
<natTimeoutSeconds>0</natTimeoutSeconds>
|
||||
<urAccepted>3</urAccepted>
|
||||
<urSeen>3</urSeen>
|
||||
<urUniqueID></urUniqueID>
|
||||
<urURL>https://data.syncthing.net/newdata</urURL>
|
||||
<urPostInsecurely>false</urPostInsecurely>
|
||||
<urInitialDelayS>1800</urInitialDelayS>
|
||||
<restartOnWakeup>true</restartOnWakeup>
|
||||
<autoUpgradeIntervalH>12</autoUpgradeIntervalH>
|
||||
<upgradeToPreReleases>false</upgradeToPreReleases>
|
||||
<keepTemporariesH>24</keepTemporariesH>
|
||||
<cacheIgnoredFiles>false</cacheIgnoredFiles>
|
||||
<progressUpdateIntervalS>5</progressUpdateIntervalS>
|
||||
<limitBandwidthInLan>false</limitBandwidthInLan>
|
||||
<minHomeDiskFree unit="%">0</minHomeDiskFree>
|
||||
<releasesURL>https://upgrades1.syncthing.net/meta.json</releasesURL>
|
||||
<overwriteRemoteDeviceNamesOnConnect>true</overwriteRemoteDeviceNamesOnConnect>
|
||||
<tempIndexMinBlocks>10</tempIndexMinBlocks>
|
||||
<trafficClass>0</trafficClass>
|
||||
<defaultFolderPath>__SYNC_HOME__</defaultFolderPath>
|
||||
<minHomeDiskFree unit="%">1</minHomeDiskFree>
|
||||
<setLowPriority>true</setLowPriority>
|
||||
<maxConcurrentScans>0</maxConcurrentScans>
|
||||
</options>
|
||||
</configuration>
|
||||
|
|
|
@ -65,7 +65,7 @@ ynh_app_setting_set $app gui_port $gui_port
|
|||
|
||||
sync_port=$(ynh_find_port 22000)
|
||||
# Open this port
|
||||
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $sync_port
|
||||
ynh_exec_warn_less yunohost firewall allow TCP $sync_port
|
||||
ynh_app_setting_set $app sync_port $sync_port
|
||||
|
||||
#=================================================
|
||||
|
@ -124,6 +124,18 @@ cp "../conf/config.xml" "$config_file"
|
|||
ynh_replace_string "__GUI_PORT__" "$gui_port" "$config_file"
|
||||
ynh_replace_string "__SYNC_HOME__" "$sync_home" "$config_file"
|
||||
|
||||
#=================================================
|
||||
# FIX LISTENING SERVICE
|
||||
#=================================================
|
||||
|
||||
chown -R $app: $final_path
|
||||
|
||||
ynh_systemd_action --action=start --service_name=$app --log_path=systemd --line_match="Access the GUI via the following URL"
|
||||
|
||||
ynh_replace_string "<listenAddress>tcp://default</listenAddress>" "<listenAddress>default</listenAddress>" "$config_file"
|
||||
|
||||
ynh_systemd_action --action=stop --service_name=$app --log_path=systemd
|
||||
|
||||
#=================================================
|
||||
# STORE THE CONFIG FILE CHECKSUM
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue