Set the crontab directly
Saves a temporary file when the HERE-document is already a temp file.
This commit is contained in:
parent
fce7331e56
commit
082b56789e
1 changed files with 2 additions and 5 deletions
|
@ -25,13 +25,10 @@ for key in /docker/keys/*.pub ; do
|
||||||
done
|
done
|
||||||
chown -R user /home/user/.ssh
|
chown -R user /home/user/.ssh
|
||||||
|
|
||||||
# load cron
|
# load crontab for root
|
||||||
CRONFILE=`mktemp`
|
crontab <<EOF
|
||||||
cat > $CRONFILE <<EOF
|
|
||||||
* * * * * /usr/local/sbin/reprepro-import >> /var/log/reprepro.log
|
* * * * * /usr/local/sbin/reprepro-import >> /var/log/reprepro.log
|
||||||
EOF
|
EOF
|
||||||
crontab -u root $CRONFILE
|
|
||||||
rm -f $CRONFILE
|
|
||||||
|
|
||||||
# run import once, to create the right directory structure
|
# run import once, to create the right directory structure
|
||||||
/usr/local/sbin/reprepro-import
|
/usr/local/sbin/reprepro-import
|
||||||
|
|
Loading…
Reference in a new issue