AI Implementation feature(1082): Project Scaffold and Docker Packaging (#1)
This commit was merged in pull request #1.
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
CRON_FILE="${1:-/etc/cron.d/tenbackward}"
|
||||
|
||||
if [ ! -f "${CRON_FILE}" ]; then
|
||||
echo "install-cron: cron file ${CRON_FILE} does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep -q '__RUN_AT__' "${CRON_FILE}"; then
|
||||
echo "install-cron: refusing to install cron file with unresolved __RUN_AT__ placeholder" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
chmod 0644 "${CRON_FILE}"
|
||||
|
||||
if ! head -n 1 "${CRON_FILE}" | grep -qE '^[A-Z_]+='; then
|
||||
echo "install-cron: ${CRON_FILE} must start with a cron env line (e.g. SHELL=/bin/bash)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "install-cron: ${CRON_FILE} installed (mode 0644)"
|
||||
@@ -0,0 +1,2 @@
|
||||
SHELL=/bin/bash
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
Reference in New Issue
Block a user