diff options
-rw-r--r-- | main/postgresql-common/APKBUILD | 6 | ||||
-rw-r--r-- | main/postgresql-common/postgresql.initd | 19 |
2 files changed, 15 insertions, 10 deletions
diff --git a/main/postgresql-common/APKBUILD b/main/postgresql-common/APKBUILD index 2e9ca20f6fc..213e009274f 100644 --- a/main/postgresql-common/APKBUILD +++ b/main/postgresql-common/APKBUILD @@ -1,8 +1,8 @@ # Maintainer: Jakub Jirutka <jakub@jirutka.cz> # Contributor: Jakub Jirutka <jakub@jirutka.cz> pkgname=postgresql-common -pkgver=1.0 -pkgrel=1 +pkgver=1.1 +pkgrel=0 pkgdesc="Common files for PostgreSQL" url="https://www.postgresql.org/" arch="noarch" @@ -33,6 +33,6 @@ openrc() { sha512sums=" f9887e260bbcccb1a96030d3065459f1c0b4b8c50e62008ab1e0964e5b281de330e3d25b311eb88a729c23342193bedb3549913b24facd4f39c1398f819c0d8c pg_versions -be0e1afaaf1d376f1d57d300d4bb314113b18bde4cd565a0532556c6ec753576eb9cbc08bdf7b18e3f1f63054cf8c96656c5216918642c54689c06a9a5e79992 postgresql.initd +41590b3009c2d6e3b215bd8f1fa7f06a15c382a7609b60b171dae67dd7b5f71e651a2d3f6a8af0e9376ca94200ded745ae864f0b34565c6ccd7857389574e9e5 postgresql.initd 611cca04bdf97284bca2c85688e3512dd5fcce2c1d40dcf2082855008cbe988dccbdc589af5021a120b2de10455b3700712f99d1b60da1e10ee953516f030db5 postgresql.confd " diff --git a/main/postgresql-common/postgresql.initd b/main/postgresql-common/postgresql.initd index 1c1a40d75c0..a4ba83c64c7 100644 --- a/main/postgresql-common/postgresql.initd +++ b/main/postgresql-common/postgresql.initd @@ -107,8 +107,6 @@ start_pre() { } start() { - local retval - ebegin "Starting $name" rm -f "$pidfile" @@ -121,16 +119,20 @@ start() { --log="$logfile" \ --pgdata="$conf_dir" \ -o "--data-directory=$data_dir $pg_opts" - retval=$? - if [ $retval -ne 0 ]; then + if eend $? "Failed to start $name"; then + service_set_value "command" "$command" + service_set_value "pidfile" "$pidfile" + else eerror "Check the log for a possible explanation of the above error:" eerror " $logfile" + return 1 fi - eend $retval } stop() { + local command=$(service_get_value "command" || echo "$command") + local pidfile=$(service_get_value "pidfile" || echo "$pidfile") local retry='' [ "$stop_smart_timeout" -eq 0 ] \ @@ -151,7 +153,7 @@ stop() { --retry "$retry" \ --progress \ --pidfile "$pidfile" - eend $? + eend $? "Failed to stop $name" } stop_smart() { @@ -167,6 +169,9 @@ stop_force() { } _stop() { + local command=$(service_get_value "command" || echo "$command") + local pidfile=$(service_get_value "pidfile" || echo "$pidfile") + ebegin "Stopping $name ($2)" start-stop-daemon --stop \ @@ -174,7 +179,7 @@ _stop() { --signal "$1" \ --pidfile "$pidfile" \ && mark_service_stopped "$RC_SVCNAME" - eend $? + eend $? "Failed to stop $name" } reload() { |