diff --git a/tools/containers_check_update_rebuild_switch__crontask_install.sh b/tools/containers_check_update_rebuild_switch__crontask_install.sh new file mode 100755 index 0000000..8bfcc5c --- /dev/null +++ b/tools/containers_check_update_rebuild_switch__crontask_install.sh @@ -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 -