← Back to team overview

epoptes team mailing list archive

[Merge] lp:~oiteam/epoptes/respawning-timeout-configurable into lp:epoptes

 

Laércio de Sousa has proposed merging lp:~oiteam/epoptes/respawning-timeout-configurable into lp:epoptes.

Requested reviews:
  Epoptes Developers (epoptes)
Related bugs:
  Bug #1517574 in Epoptes: "Make socat timeout configurable in /etc/default/epoptes-client"
  https://bugs.launchpad.net/epoptes/+bug/1517574

For more details, see:
https://code.launchpad.net/~oiteam/epoptes/respawning-timeout-configurable/+merge/277892

Now that a socat timeout was introduced in revision 458, I would like to propose a little suggestion: make it configurable in /etc/default/epoptes-client. Some users may want to give it a greater or smaller value, depending on their network characteristics.
-- 
Your team Epoptes Developers is requested to review the proposed merge of lp:~oiteam/epoptes/respawning-timeout-configurable into lp:epoptes.
=== modified file 'debian/epoptes-client.default'
--- debian/epoptes-client.default	2012-10-28 17:34:32 +0000
+++ debian/epoptes-client.default	2015-11-18 18:40:08 +0000
@@ -10,5 +10,9 @@
 # to connect to. For security reasons it defaults to a system port, 789.
 #PORT=789
 
+# The timeout to wait before respawning epoptes-client
+# in case of network inactivity
+#TIMEOUT=20
+
 # Set Wake On LAN for devices that support it. Comment it out to disable it.
 WOL=g

=== modified file 'epoptes-client/epoptes-client'
--- epoptes-client/epoptes-client	2015-11-18 08:51:11 +0000
+++ epoptes-client/epoptes-client	2015-11-18 18:40:08 +0000
@@ -226,7 +226,7 @@
 # Connect to the server, or keep retrying until the server gets online
 # (for standalone workstations booted before the server).
 if [ -s /etc/epoptes/server.crt ] || [ "$cert_param" = "verify=0" ]; then
-    exec socat -T 20 openssl-connect:$SERVER:$PORT,$cert_param,interval=60,forever EXEC:"$cmdline"
+    exec socat -T ${TIMEOUT:-20} openssl-connect:$SERVER:$PORT,$cert_param,interval=60,forever EXEC:"$cmdline"
 elif [ -f /etc/epoptes/server.crt ]; then
    exec socat tcp:$SERVER:$PORT,interval=60,forever EXEC:"$cmdline",nofork
 else