quotes to prevent word-splitting

This commit is contained in:
Asif Bacchus 2019-05-19 20:43:06 -06:00
parent 21dbdcf1a6
commit a9ec3113a1

View File

@ -199,12 +199,12 @@ function svcSeafile {
pidShub=$(pgrep -f "seahub") pidShub=$(pgrep -f "seahub")
pidSeaf=$(pgrep -f seafile-controller) pidSeaf=$(pgrep -f seafile-controller)
# force stop seahub # force stop seahub
if [ $pidShub ]; then if [ "$pidShub" ]; then
pkill -f "seahub" pkill -f "seahub"
exitWarn+=("[$(stamp)]_101") exitWarn+=("[$(stamp)]_101")
fi fi
# force stop seafile # force stop seafile
if [ $pidSeaf ]; then if [ "$pidSeaf" ]; then
pkill -f seafile-controller pkill -f seafile-controller
exitWarn+=("[$(stamp)]_101") exitWarn+=("[$(stamp)]_101")
fi fi
@ -733,7 +733,7 @@ if [ -z "$borgExclude" ]; then
# borgExclude is empty # borgExclude is empty
echo -e "${info}[$(stamp)] --[INFO] Executing borg without exclusions --" \ echo -e "${info}[$(stamp)] --[INFO] Executing borg without exclusions --" \
"${normal}" >> "$logFile" "${normal}" >> "$logFile"
borg --show-rc create ${borgCreateParams} ::`date +%Y-%m-%d_%H%M%S` \ borg --show-rc create ${borgCreateParams} ::"$(date +%Y-%m-%d_%H%M%S)" \
"${xtraFiles[@]}" \ "${xtraFiles[@]}" \
"${sqlDumpDir}" "${dataDir}" \ "${sqlDumpDir}" "${dataDir}" \
2>> "$logFile" 2>> "$logFile"
@ -742,7 +742,7 @@ else
echo -e "${info}[$(stamp)] --[INFO] Executing borg with exclusions --" \ echo -e "${info}[$(stamp)] --[INFO] Executing borg with exclusions --" \
"${normal}" >> "$logFile" "${normal}" >> "$logFile"
borg --show-rc create ${borgCreateParams} --exclude-from "${borgExclude}" \ borg --show-rc create ${borgCreateParams} --exclude-from "${borgExclude}" \
::`date +%Y-%m-%d_%H%M%S` \ ::"$(date +%Y-%m-%d_%H%M%S)" \
"${xtraFiles[@]}" \ "${xtraFiles[@]}" \
"${sqlDumpDir}" "${dataDir}" \ "${sqlDumpDir}" "${dataDir}" \
2>> "$logFile" 2>> "$logFile"