feat: escaped every variable properly

This commit is contained in:
Mustapha Zorgati
2021-02-23 22:27:19 +01:00
parent b902187e73
commit 3016777872
5 changed files with 44 additions and 44 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
. /app/includes.sh
@@ -37,7 +37,7 @@ fi
function configure_timezone() {
if [[ ! -f /etc/localtime || ! -f /etc/timezone ]]; then
cp -f /usr/share/zoneinfo/${TIMEZONE} /etc/localtime
cp -f "/usr/share/zoneinfo/${TIMEZONE}" /etc/localtime
echo "${TIMEZONE}" > /etc/timezone
fi
}
@@ -45,7 +45,7 @@ function configure_timezone() {
function configure_cron() {
local FIND_CRON_COUNT=$(crontab -l | grep -c 'backup.sh')
if [[ ${FIND_CRON_COUNT} -eq 0 ]]; then
echo "${CRON} sh /app/backup.sh > /dev/stdout" >> /etc/crontabs/root
echo "${CRON} bash /app/backup.sh > /dev/stdout" >> /etc/crontabs/root
fi
}