Skip to content

Commit e37265c

Browse files
committed
add banner and make crontab prettier
1 parent ee4456f commit e37265c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

crontroll

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
#!/bin/sh
2+
banner="\
3+
# ▗▄▖ ▗▄▖
4+
# ▐▌ ▝▜▌ ▝▜▌
5+
# ▟██▖ █▟█▌ ▟█▙ ▐▙██▖▐███ █▟█▌ ▟█▙ ▐▌ ▐▌
6+
# ▐▛ ▘ █▘ ▐▛ ▜▌▐▛ ▐▌ ▐▌ █▘ ▐▛ ▜▌ ▐▌ ▐▌
7+
# ▐▌ █ ▐▌ ▐▌▐▌ ▐▌ ▐▌ █ ▐▌ ▐▌ ▐▌ ▐▌
8+
# ▝█▄▄▌ █ ▝█▄█▘▐▌ ▐▌ ▐▙▄ █ ▝█▄█▘ ▐▙▄ ▐▙▄
9+
# ▝▀▀ ▀ ▝▀▘ ▝▘ ▝▘ ▀▀ ▀ ▝▀▘ ▀▀ ▀▀
10+
#"
211
set -e
312
if [ -z "${CRONDIR}" ];then
413
crondir="$HOME/.cron"
@@ -42,12 +51,16 @@ checkargs(){
4251
reload_crontab(){
4352
mkdir -p $logdir
4453
if ls * 1> /dev/null 2>&1; then
54+
echo "$banner"
55+
echo "# This crontab is managed by crontroll. Do not edit it manually, as it will get overwritten"
56+
echo -n "\n\n\n"
4557
for f in *;do
4658
mkdir -p "$logdir/$f"
4759
data="`cat $f`"
60+
echo "# $f"
4861
echo -n "$data"
4962
printf "$logcommand" "$logdir/$f"
50-
echo
63+
echo "\n"
5164
done
5265
fi|crontab -
5366
}

0 commit comments

Comments
 (0)