Commit 3f93c207 authored by Lucas Sulzbach's avatar Lucas Sulzbach

Update cron job

parent aa97228a
......@@ -26,9 +26,13 @@ if [ "$(id -u)" != "0" ]; then
exit -1
fi
CMD="$1 --profile le6 --version 6.1.1 --repo testing --debug --sendmail"
CFGFILE="$(realpath "$(dirname "$0")")/vars.cfg"
SESSION="$(date +'%Y-%m-%d')"
PREFIX="$(realpath "$(dirname "$0")")"
EXE="$1"
VERSION="$2"
ISOPATH="$3"
TODAY="$(date +'%Y-%m-%d')"
CMD="\"${EXE}\" --profile le6 --version \"${VERSION}\" --repo testing --output \"${PREFIX}/linux-educacional-${VERSION}-testing-${TODAY}.iso\" --debug --sendmail"
CFGFILE="${PREFIX}/vars.cfg"
source "${CFGFILE}"
......@@ -44,9 +48,9 @@ else
fi
# Create GNU screen session
screen -dmS "${SESSION}" || exit 1
screen -dmS "${TODAY}" || exit 1
# Execute c3geniso in the main window
screen -S "${SESSION}" -X stuff "${CMD} && exit\n" || exit 2
screen -S "${TODAY}" -X stuff "${CMD} && scp -i /home/lucas/.ssh/id_rsa_deployiso \"${PREFIX}\"/*.iso repository@repo.c3sl.ufpr.br:'/home/repository/www/le6/iso' && mv \"${PREFIX}\"/*.iso \"${ISOPATH}\" && exit\n" || exit 2
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment