Skip to content

Commit 4778463

Browse files
Changed restart scripts
Altered restart scripts to delete file in app and force re-sync from DS to restart the forwarder properly.
1 parent ffc73ff commit 4778463

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

DeleteMeToRestart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DeleteMeToRestart

bin/restart.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ if ($restartInput -eq "True" -OR $restartServer -eq "True" -OR $restartDS -eq "T
3131
if ($restartDateTime -eq "True") {
3232
Remove-Item -path "$dateTimePath"
3333
}
34-
sleep 5
35-
$restart = "restart"
36-
& "$SPLUNKHOME\bin\splunk.exe" $restart
34+
Remove-Item -path "$SPLUNKHOME\etc\apps\SplunkForwarderRepairKit\DeleteMeToRestart"
3735
} else {
3836
Write-output "No settings have been changed." | timestamp
3937
Write-output "No restart required." | timestamp

bin/restart.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ if [ -f $RESTARTINPUT ] | [ -f $RESTARTSERVER ] | [ -f $RESTARTDS ] | [ -f $REST
2525
if [ -f $RESTARTDATETIME ]; then
2626
rm $RESTARTDATETIME
2727
fi
28-
sleep 5
29-
$SPLUNK_HOME/bin/splunk restart
28+
rm -f $SPLUNK_HOME/etc/apps/SplunkForwarderRepairKit/DeleteMeToRestart
3029
else
3130
echo "$(date +"%Y-%m-%d %H:%M:%S.%3N") ${HOSTNAME}: No settings have been changed."
3231
echo "$(date +"%Y-%m-%d %H:%M:%S.%3N") ${HOSTNAME}: No restart required."

0 commit comments

Comments
 (0)