From 19db3b08650598bf80b1f9681f54a02f3afb0ddd Mon Sep 17 00:00:00 2001 From: Luke Butters Date: Tue, 6 Feb 2024 11:00:18 +1100 Subject: [PATCH] Support non 10943 comms ports in the linux tentacle config script --- linux-packages/content/configure-tentacle.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) mode change 100644 => 100755 linux-packages/content/configure-tentacle.sh diff --git a/linux-packages/content/configure-tentacle.sh b/linux-packages/content/configure-tentacle.sh old mode 100644 new mode 100755 index 218e4880f..54b1d0f14 --- a/linux-packages/content/configure-tentacle.sh +++ b/linux-packages/content/configure-tentacle.sh @@ -100,6 +100,7 @@ function setupPollingTentacle { rolesstring="" workerpoolsstring="" machinetype=1 + servercommsport=10943 read -p "Where would you like Tentacle to store log files? ($logpath):" inputlogpath logpath=$(assignNonEmptyValue "$inputlogpath" $logpath) @@ -149,6 +150,9 @@ function setupPollingTentacle { read -p "What name would you like to register this Tentacle with? ($displayname): " displaynameinput displayname=$(assignNonEmptyValue "$displaynameinput" $displayname) + read -p "What port is the Octopus Server comms port? ($servercommsport): " servercommsportinput + servercommsport=$(assignNonEmptyValue "$servercommsportinput" $servercommsport) + case $machinetype in 2 | worker) #Get worker pools @@ -181,9 +185,9 @@ function setupPollingTentacle { echo -e "sudo /opt/octopus/tentacle/Tentacle configure --instance \"$instancename\" --app \"$applicationpath\" --noListen \"True\" --reset-trust" if [ $machinetype = 2 ] || [ $machinetype = "worker" ]; then - echo -e "sudo /opt/octopus/tentacle/Tentacle register-worker --instance \"$instancename\" --server \"$octopusserverurl\" --name \"$displayname\" --comms-style \"TentacleActive\" --server-comms-port \"10943\" $displayauth --space \"$space\" $workerpoolsstring" + echo -e "sudo /opt/octopus/tentacle/Tentacle register-worker --instance \"$instancename\" --server \"$octopusserverurl\" --name \"$displayname\" --comms-style \"TentacleActive\" --server-comms-port \"$servercommsport\" $displayauth --space \"$space\" $workerpoolsstring" else - echo -e "sudo /opt/octopus/tentacle/Tentacle register-with --instance \"$instancename\" --server \"$octopusserverurl\" --name \"$displayname\" --comms-style \"TentacleActive\" --server-comms-port \"10943\" $displayauth --space \"$space\" $envstring $rolesstring" + echo -e "sudo /opt/octopus/tentacle/Tentacle register-with --instance \"$instancename\" --server \"$octopusserverurl\" --name \"$displayname\" --comms-style \"TentacleActive\" --server-comms-port \"$servercommsport\" $displayauth --space \"$space\" $envstring $rolesstring" fi echo -e "sudo /opt/octopus/tentacle/Tentacle service --install --start --instance \"$instancename\"${NC}" @@ -200,9 +204,9 @@ function setupPollingTentacle { exitIfCommandFailed if [ $machinetype = 2 ] || [ $machinetype = "worker" ]; then - eval sudo /opt/octopus/tentacle/Tentacle register-worker --instance \"$instancename\" --server \"$octopusserverurl\" --name \"$displayname\" --comms-style \"TentacleActive\" --server-comms-port \"10943\" $auth --space \"$space\" $workerpoolsstring + eval sudo /opt/octopus/tentacle/Tentacle register-worker --instance \"$instancename\" --server \"$octopusserverurl\" --name \"$displayname\" --comms-style \"TentacleActive\" --server-comms-port \"$servercommsport\" $auth --space \"$space\" $workerpoolsstring else - eval sudo /opt/octopus/tentacle/Tentacle register-with --instance \"$instancename\" --server \"$octopusserverurl\" --name \"$displayname\" --comms-style \"TentacleActive\" --server-comms-port \"10943\" $auth --space \"$space\" $envstring $rolesstring + eval sudo /opt/octopus/tentacle/Tentacle register-with --instance \"$instancename\" --server \"$octopusserverurl\" --name \"$displayname\" --comms-style \"TentacleActive\" --server-comms-port \"$servercommsport\" $auth --space \"$space\" $envstring $rolesstring fi exitIfCommandFailed