File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -7,23 +7,23 @@ RESTARTGUID="$SPLUNK_HOME/etc/restartguid.txt"
77RESTARTDATETIME=" $SPLUNK_HOME /etc/restartdatetime.txt"
88
99# ## If any files exist, restart forwarder
10- if [ -f $RESTARTINPUT ] || [ -f $RESTARTSERVER ] || [ -f $RESTARTDS ] || [ -f $RESTARTGUID ] || [ -f $RESTARTDATETIME ]; then
10+ if [ -f " $RESTARTINPUT " ] || [ -f " $RESTARTSERVER " ] || [ -f " $RESTARTDS " ] || [ -f " $RESTARTGUID " ] || [ -f " $RESTARTDATETIME " ]; then
1111 echo " $( date +" %Y-%m-%d %H:%M:%S.%3N" ) ${HOSTNAME} : One or more settings has been changed."
1212 echo " $( date +" %Y-%m-%d %H:%M:%S.%3N" ) ${HOSTNAME} : Restarting forwarder."
13- if [ -f $RESTARTINPUT ]; then
14- rm $RESTARTINPUT
13+ if [ -f " $RESTARTINPUT " ]; then
14+ rm -f " $RESTARTINPUT "
1515 fi
16- if [ -f $RESTARTSERVER ]; then
17- rm $RESTARTSERVER
16+ if [ -f " $RESTARTSERVER " ]; then
17+ rm -f " $RESTARTSERVER "
1818 fi
19- if [ -f $RESTARTDS ]; then
20- rm $RESTARTDS
19+ if [ -f " $RESTARTDS " ]; then
20+ rm -f " $RESTARTDS "
2121 fi
22- if [ -f $RESTARTGUID ]; then
23- rm $RESTARTGUID
22+ if [ -f " $RESTARTGUID " ]; then
23+ rm -f " $RESTARTGUID "
2424 fi
25- if [ -f $RESTARTDATETIME ]; then
26- rm $RESTARTDATETIME
25+ if [ -f " $RESTARTDATETIME " ]; then
26+ rm -f " $RESTARTDATETIME "
2727 fi
2828 rm -f $SPLUNK_HOME /etc/apps/SplunkForwarderRepairKit/DeleteMeToRestart
2929else
You can’t perform that action at this time.
0 commit comments