forked from opensciencegrid/images
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a startup.sh script to make the quote-mangling for the crontab…
… generation a bit more clear
- Loading branch information
1 parent
2c21235
commit 584dc82
Showing
2 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
# Create a cron file on the fly based on docker environment variables, | ||
# Then immediately pipe it to crontab | ||
echo "$CRON_EXPR /usr/sbin/logrotate $LOGROTATE_OPTIONS $LOGROTATE_CONF" '> /proc/$(cat /var/run/crond.pid)/fd/1 2>&1' | crontab - | ||
|
||
# Start cron in non-daemon (foreground) mode | ||
crond -n |