init.dスクリプトからpostgresqlデータベースに接続できません(Debian)

init.dスクリプトからpostgresqlデータベースに接続できません(Debian)

正常に動作するスクリプトは、起動時に有効にするために/etc/init.d/スクリプト(consolenew)に入れると失敗します。特にPostgreSQLデータベースを開くことができず、エラーが発生します。could not connect to server: Connection refused

init.d/console 新しい設定:

#### BEGIN INIT INFO
# Provides: consolenew
# Required-Start: $all $postgresql $network
# Required-Stop: $all $postgresql $network 
# Default-Start: 2 3 4 5
# Default-Stop: 
# Short-Description: ....
#### END INIT INFO

/path-to-file/consolenew.sh &

システムはDebian 8です。 PostgreSQLを動作させるためにここで欠けているものは何ですか?

ベストアンサー1

ほとんどの場合、スクリプトは/etc/init.d/scriptspostgresql RDBMSに表示されないユーザー(ほとんどのユーザーroot)によってアクティブになった場所に配置されます。/etc/init.d/scriptspostgersqlに存在するユーザー/ロールで設定のスクリプトが有効になっていて、そのユーザーがpg_gba.confファイルに接続できることを確認してください。

おすすめ記事