Rework backuptask into tar.js
This makes it easy to integrate another backup strategy as the next step
This commit is contained in:
@@ -17,7 +17,6 @@ scripts=("${SOURCE_DIR}/src/scripts/rmappdir.sh" \
|
||||
"${SOURCE_DIR}/src/scripts/collectlogs.sh" \
|
||||
"${SOURCE_DIR}/src/scripts/configurecollectd.sh" \
|
||||
"${SOURCE_DIR}/src/scripts/authorized_keys.sh" \
|
||||
"${SOURCE_DIR}/src/scripts/node.sh" \
|
||||
"${SOURCE_DIR}/src/scripts/configurelogrotate.sh")
|
||||
|
||||
for script in "${scripts[@]}"; do
|
||||
@@ -33,6 +32,21 @@ for script in "${scripts[@]}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
scripts=("${SOURCE_DIR}/src/scripts/tar.js")
|
||||
|
||||
for script in "${scripts[@]}"; do
|
||||
if [[ $(sudo -n "${script}" 2>/dev/null) ]]; then
|
||||
echo ""
|
||||
echo "${script} does not have sudo access."
|
||||
echo "You have to add the lines below to /etc/sudoers.d/yellowtent."
|
||||
echo ""
|
||||
echo "Defaults!${script} env_keep=\"HOME BOX_ENV\""
|
||||
echo "${USER} ALL=(ALL) NOPASSWD:SETENV: ${script}"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
image_missing=""
|
||||
|
||||
images=$(node -e "var i = require('${SOURCE_DIR}/src/infra_version.js'); console.log(Object.keys(i.images).map(function (x) { return i.images[x].tag; }).join('\n'));"; echo $TEST_IMAGE)
|
||||
|
||||
Reference in New Issue
Block a user