X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plc.d%2Fpostgresql;h=989cd7ee2db6492a618d26a3a17b6dd71d445e3f;hb=428f3d0bc1d3148bba33bc6b6ea4346de2ced398;hp=3b77e53f5ced0ec25506edcfd38feb8f58dcefd1;hpb=269c65e50075def8b3f1b3d7a06b1f7dff77b483;p=plcapi.git diff --git a/plc.d/postgresql b/plc.d/postgresql index 3b77e53..989cd7e 100755 --- a/plc.d/postgresql +++ b/plc.d/postgresql @@ -51,7 +51,9 @@ case "$1" in MESSAGE=$"Starting PostgreSQL server" dialog "$MESSAGE" - ######## sysconfig + ######## sysconfig +# xxx on f16, the systemd init script won't read /etc/sysconfig/pgsql/postgresql any more +# need to find out how to perform this configuration, if still needed # Set data directory and redirect startup output to /var/log/pgsql mkdir -p $(dirname $postgresql_sysconfig) touch $postgresql_sysconfig @@ -92,8 +94,8 @@ case "$1" in echo "timezone='UTC'" >> $postgresql_conf ######## /var/lib/pgsql/data/pg_hba.conf - # Disable access to MyPLC and drupal DBs from all hosts - sed -i -e '/^\(host\|local\)\s\($PLC_DB_NAME\|drupal\)/d' $pghba_conf + # Disable access to MyPLC and drupal DBs from all hosts + sed -i -e '/^\(host\|local\)/d' $pghba_conf # Enable passwordless localhost access echo "local all all trust" >>$pghba_conf @@ -150,7 +152,8 @@ case "$1" in if [ -z "$PLC_DB_PASSWORD" ] ; then PLC_DB_PASSWORD=$(uuidgen) plc-config --category=plc_db --variable=password --value="$PLC_DB_PASSWORD" --save=$local_config $local_config - service plc reload + #service plc reload + reload force fi if ! psql -U $PLC_DB_USER -c "" template1 >/dev/null 2>&1 ; then psql -U postgres -c "CREATE USER $PLC_DB_USER PASSWORD '$PLC_DB_PASSWORD'" template1