Skip to content

Commit 446105c

Browse files
Update dsRemove.sh
Added logic to determine if a deployed app is available only if a local deploymentclient.conf file needs to be removed
1 parent ef106d3 commit 446105c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/dsRemove.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ LOCAL=$(find $SPLUNK_HOME/etc/system/local -type f -name deploymentclient.conf |
55
RESTART_CHECK=$SPLUNK_HOME/etc/restartds.txt
66

77
### Check variables and take action accordingly
8-
if [ $DEPLOYED_APP = "0" ]; then
8+
if [ $LOCAL = "1" ] & [ $DEPLOYED_APP = "0" ]; then
99
echo $(date -R) $HOSTNAME: No deploymentclient.conf detected in \$SPLUNK_HOME/etc/apps. Bailing out so the fowarder doesn\'t get orphaned.
1010
exit
11-
elif [ $LOCAL = "1" ]; then
11+
elif [ $LOCAL = "1" ] & [ $DEPLOYED_APP = "1" ]; then
1212
# Remove the deploymentclient.conf from $SPLUNK_HOME/etc/system/local
1313
rm -f $SPLUNK_HOME/etc/system/local/deploymentclient.conf > /dev/null 2>&1
1414
echo $(date -R) $HOSTNAME: Removed deploymentclient.conf from local system.

0 commit comments

Comments
 (0)