feat: escaped every variable properly
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user