Install cron task that rebuilds images when needed.
This commit is contained in:
13
tools/containers_check_update_rebuild_switch__crontask_install.sh
Executable file
13
tools/containers_check_update_rebuild_switch__crontask_install.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd -P "$(dirname "$(readlink -f "$0")" )"
|
||||
|
||||
if [[ "$PWD" != "$(printf %q "$PWD" )" ]]
|
||||
then
|
||||
echo >&2 "WARNING: path seems unsafe: $PWD"
|
||||
fi
|
||||
|
||||
{
|
||||
crontab -l | grep -v containers_check_update_rebuild_switch.sh
|
||||
echo "0 0 * * * $PWD/run_and_output_only_on_error.sh $PWD/containers_check_update_rebuild_switch.sh"
|
||||
} | crontab -
|
||||
Reference in New Issue
Block a user