This repository was archived by the owner on Jul 6, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,24 @@ PG_STATS_TEMP_DIR=$(${CHECK_HOST_CMD} "${_PSQL} -f -" <<EOF
20
20
EOF
21
21
)
22
22
23
- PG_LOG_DIR =$( ${CHECK_HOST_CMD} " ${_PSQL} -f -" << EOF
24
- show log_directory
23
+ log_destination =$( ${CHECK_HOST_CMD} " ${_PSQL} -f -" << EOF
24
+ show log_destination
25
25
EOF
26
26
)
27
27
28
- # process relative paths
29
- if ! [[ " ${PG_LOG_DIR} " =~ ^/ ]]; then
30
- PG_LOG_DIR=" ${PG_DATA_DIR} /${PG_LOG_DIR} "
28
+ if [[ " $log_destination " != " syslog" ]]; then
29
+ PG_LOG_DIR=$( ${CHECK_HOST_CMD} " ${_PSQL} -f -" << EOF
30
+ show log_directory
31
+ EOF
32
+ )
33
+ # process relative paths
34
+ if ! [[ " ${PG_LOG_DIR} " =~ ^/ ]]; then
35
+ PG_LOG_DIR=" ${PG_DATA_DIR} /${PG_LOG_DIR} "
36
+ fi
37
+ else
38
+ PG_LOG_DIR=" syslog"
31
39
fi
40
+
32
41
if ! [[ " ${PG_STATS_TEMP_DIR} " =~ ^/ ]]; then
33
42
PG_STATS_TEMP_DIR=" ${PG_DATA_DIR} /${PG_STATS_TEMP_DIR} "
34
43
fi
@@ -113,6 +122,10 @@ if $(${CHECK_HOST_CMD} "sudo stat \"$PG_LOG_DIR\" >/dev/null 2>&1"); then
113
122
echo " ,"
114
123
echo " \" log_directory\" :"
115
124
print_df " $PG_LOG_DIR "
125
+ elif [[ " $PG_LOG_DIR " == " syslog" ]]; then
126
+ echo " ,"
127
+ echo " \" log_directory\" :"
128
+ df_to_json " syslog" " " " " " " " " " " " " " " " "
116
129
fi
117
130
118
131
echo " },"
You can’t perform that action at this time.
0 commit comments