[type/__postgres_conf] Fix errors found by ShellCheck
This commit is contained in:
parent
c51d68a737
commit
534d5f6bb5
1 changed files with 3 additions and 4 deletions
|
@ -20,8 +20,8 @@
|
||||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
os=$(cat "${__global}/explorer/os")
|
os=$(cat "${__global:?}/explorer/os")
|
||||||
state_should=$(cat "${__object}/parameter/state")
|
state_should=$(cat "${__object:?}/parameter/state")
|
||||||
|
|
||||||
if [ "${state_should}" != 'present' ] && [ "${state_should}" != 'absent' ]
|
if [ "${state_should}" != 'present' ] && [ "${state_should}" != 'absent' ]
|
||||||
then
|
then
|
||||||
|
@ -37,7 +37,7 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Parameters
|
# Parameters
|
||||||
conf_name="${__object_id}"
|
conf_name="${__object_id:?}"
|
||||||
if [ -f "${__object}/parameter/value" ]
|
if [ -f "${__object}/parameter/value" ]
|
||||||
then
|
then
|
||||||
conf_value=$(cat "${__object}/parameter/value")
|
conf_value=$(cat "${__object}/parameter/value")
|
||||||
|
@ -46,7 +46,6 @@ fi
|
||||||
if [ "${state_should}" = 'present' ]
|
if [ "${state_should}" = 'present' ]
|
||||||
then
|
then
|
||||||
set_command="ALTER SYSTEM SET ${conf_name} = '${conf_value}'"
|
set_command="ALTER SYSTEM SET ${conf_name} = '${conf_value}'"
|
||||||
check_command="SHOW ${conf_name}"
|
|
||||||
else
|
else
|
||||||
set_command="ALTER SYSTEM SET ${conf_name} = DEFAULT"
|
set_command="ALTER SYSTEM SET ${conf_name} = DEFAULT"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue