Skip to content

Commit b04d5bf

Browse files
committed
(maint) shellcheck, spacing, and case
1 parent 9ab886d commit b04d5bf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: files/puppet_enterprise_database_backup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
usage() {
4-
echo "usage: $0 [-t BACKUP_TARGET] [-l LOG_DIRECTORY] [-r retention] <DATABASE> [DATABASE_N ...]"
4+
echo "usage: $0 [-t TARGET_BACKUP_DIRECTORY] [-l LOG_DIRECTORY] [-r RETENTION] <DATABASE> [DATABASE_N ...]"
55
exit 1
66
}
77

Diff for: files/vacuum_full_tables.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
usage() {
44
cat <<EOF
5-
echo "usage: $0 <table set> [sleep duration]"
6-
where <table set> is one of: facts catalogs other
7-
and [sleep duration] is an optional integer of seconds to sleep. Defaults to 300
5+
echo "usage: $0 <TABLE_SET> [SLEEP_DURATION]"
6+
where <TABLE_SET> is one of: facts catalogs other
7+
and [SLEEP_DURATION] is an optional integer of seconds to sleep. Defaults to 300
88
EOF
99
exit 1
1010
}
@@ -27,14 +27,14 @@ case "$1" in
2727
usage
2828
esac
2929

30-
3130
SQL="SELECT t.relname::varchar AS table_name
3231
FROM pg_class t
3332
JOIN pg_namespace n
3433
ON n.oid = t.relnamespace
3534
WHERE t.relkind = 'r'
3635
AND t.relname IN ( $(IFS=,; echo "${vacuum_tables[*]}") )"
3736

37+
# shellcheck disable=SC2207
3838
tables=($(su - pe-postgres -s /bin/bash -c "/opt/puppetlabs/server/bin/psql -d pe-puppetdb -c \"$SQL\" --tuples-only"))
3939

4040
for table in "${tables[@]}"; do

0 commit comments

Comments
 (0)