File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -7,16 +7,16 @@ fail() {
7
7
# Print a stderr: entry if there were anything printed to stderr
8
8
if [[ -s $_tmp ]]; then
9
9
# Hack to try and output valid json by replacing newlines with spaces.
10
- echo " { \" status\" : \" error\" , \" message\" : \" $1 \" , \" stderr\" : \" $( tr ' \n' ' ' < $_tmp ) \" }"
10
+ $( /usr/bin/which echo) " { \" status\" : \" error\" , \" message\" : \" $1 \" , \" stderr\" : \" $( tr ' \n' ' ' < $_tmp ) \" }"
11
11
else
12
- echo " { \" status\" : \" error\" , \" message\" : \" $1 \" }"
12
+ $( /usr/bin/which echo) " { \" status\" : \" error\" , \" message\" : \" $1 \" }"
13
13
fi
14
14
15
15
exit ${2:- 1}
16
16
}
17
17
18
18
success () {
19
- echo " $1 "
19
+ $( /usr/bin/which echo) " $1 "
20
20
exit 0
21
21
}
22
22
Original file line number Diff line number Diff line change 56
56
57
57
# Reset the crontab for pe-postgres if the (databases backed up by default every day) change.
58
58
exec { 'reset_pe-postgres_crontab' :
59
- path => ' /usr/local/bin/:/bin/' ,
59
+ path => ' /usr/local/bin/:/bin/:/usr/bin ' ,
60
60
command => ' crontab -r -u pe-postgres' ,
61
61
onlyif => ' crontab -l -u pe-postgres' ,
62
62
refreshonly => true ,
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
3
3
# Puppet Task Name: reset_pgrepack_schema
4
4
declare PT__installdir
5
5
# shellcheck disable=SC1090
6
6
source " $PT__installdir /pe_databases/files/common.sh"
7
7
8
8
# Determine if PE Postgres is available
9
- if puppet resource service pe-postgresql | grep -q running; then
9
+ if puppet resource service pe-postgresql | $( /usr/bin/which grep) -q running; then
10
10
# Remove the pg_repack extension
11
11
su - pe-postgres -s ' /bin/bash' -c ' /opt/puppetlabs/server/bin/psql -d pe-puppetdb -c "DROP EXTENSION pg_repack CASCADE"' || fail " unable to drop pg_repack extension"
12
12
You can’t perform that action at this time.
0 commit comments