feat: check repo script
This commit is contained in:
parent
1cd2b290de
commit
a171a058f9
3 changed files with 34 additions and 0 deletions
14
tools/repo/check.d/crontabs.sh
Executable file
14
tools/repo/check.d/crontabs.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
for cronfile in skel/etc/cron.d/*; do
|
||||
echo "checking $cronfile..."
|
||||
if ! echo "$cronfile" | grep -q "."; then
|
||||
echo "$cronfile: crontabs may not have an extension"
|
||||
exit 1
|
||||
fi
|
||||
if ! [ $(tail -c1 "$cronfile" | wc -l) -gt 0 ]; then
|
||||
echo "$cronfile: crontabs must end with a newline"
|
||||
exit 1
|
||||
fi
|
||||
done
|
8
tools/repo/check.d/docker-compose-config.sh
Executable file
8
tools/repo/check.d/docker-compose-config.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
for s in servers/*; do
|
||||
echo "checking $s..."
|
||||
HOSTNAME=$(echo $s | sed 's/servers\///') bash tools/server-docker-compose.sh config -q
|
||||
done
|
12
tools/repo/check.sh
Executable file
12
tools/repo/check.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
for c in tools/repo/check.d/*; do
|
||||
echo "running $c..."
|
||||
$c | while read line; do
|
||||
echo -e "$c: $line"
|
||||
done
|
||||
done
|
||||
|
||||
echo "repo is OK"
|
||||
exit 0
|
Loading…
Reference in a new issue