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"
7
7
RESTARTDATETIME=" $SPLUNK_HOME /etc/restartdatetime.txt"
8
8
9
9
# ## 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
11
11
echo " $( date +" %Y-%m-%d %H:%M:%S.%3N" ) ${HOSTNAME} : One or more settings has been changed."
12
12
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 "
15
15
fi
16
- if [ -f $RESTARTSERVER ]; then
17
- rm $RESTARTSERVER
16
+ if [ -f " $RESTARTSERVER " ]; then
17
+ rm -f " $RESTARTSERVER "
18
18
fi
19
- if [ -f $RESTARTDS ]; then
20
- rm $RESTARTDS
19
+ if [ -f " $RESTARTDS " ]; then
20
+ rm -f " $RESTARTDS "
21
21
fi
22
- if [ -f $RESTARTGUID ]; then
23
- rm $RESTARTGUID
22
+ if [ -f " $RESTARTGUID " ]; then
23
+ rm -f " $RESTARTGUID "
24
24
fi
25
- if [ -f $RESTARTDATETIME ]; then
26
- rm $RESTARTDATETIME
25
+ if [ -f " $RESTARTDATETIME " ]; then
26
+ rm -f " $RESTARTDATETIME "
27
27
fi
28
28
rm -f $SPLUNK_HOME /etc/apps/SplunkForwarderRepairKit/DeleteMeToRestart
29
29
else
You can’t perform that action at this time.
0 commit comments