aboutsummaryrefslogtreecommitdiffstats
path: root/main/opensmtpd
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-06-08 18:26:25 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-06-08 18:26:55 +0200
commit47b9ff1206f8232d6483efbaa9d5f4fadee7ffc9 (patch)
tree528d1cf8bb6e2f8c0f041366aca7ed440679568b /main/opensmtpd
parentc9cfe39e8add23b5821ebf04919640e8d67f50f3 (diff)
downloadaports-47b9ff1206f8232d6483efbaa9d5f4fadee7ffc9.tar.bz2
aports-47b9ff1206f8232d6483efbaa9d5f4fadee7ffc9.tar.xz
main/opensmtpd: improve runscript, add checkconfig
Diffstat (limited to 'main/opensmtpd')
-rw-r--r--main/opensmtpd/APKBUILD4
-rw-r--r--main/opensmtpd/smtpd.initd14
2 files changed, 15 insertions, 3 deletions
diff --git a/main/opensmtpd/APKBUILD b/main/opensmtpd/APKBUILD
index c27f576adc..0c557cb7c3 100644
--- a/main/opensmtpd/APKBUILD
+++ b/main/opensmtpd/APKBUILD
@@ -4,7 +4,7 @@
# Maintainer: Jonathan Curran <jonathan@curran.in>
pkgname=opensmtpd
pkgver=6.0.2p1
-pkgrel=4
+pkgrel=5
pkgdesc="secure, reliable, lean, and easy-to configure SMTP server"
url="http://www.opensmtpd.org"
arch="all"
@@ -60,7 +60,7 @@ package() {
}
sha512sums="1e4275795dd2c43174ffa268398a0d9864ce4cb7d370330f7b8c55a9b40e757616bbd280919a409ebde403769e3dea62047857dc2ff98d7ecce660b459c7ff1c opensmtpd-6.0.2p1.tar.gz
-8f768c2c13012592d9893fc8c9fc53d0d1343d8c69dd9be1d4731ee11ae66bed4f7f3666f467cf0defcd74fd6148a410a817a2b070089174cca48403c3ab7170 smtpd.initd
+8d3b27c760df84804baadc90c23b34f3e99980fae97c685f98ab096c3e84ab293316cd7c49317fa3cffac7ab5e63217ada6a2c5b245f352bafe880b087e7705e smtpd.initd
51d47b34eb3d728daa45f29d6434cc75db28dfa69b6fb3ecd873121df85b296a2d2c81016d765a07778aa26a496e4b29c09a30b82678cf42596a536734b5deca aliases
e61b7b0ab98acca9c092469d3ed756161225af5126e2fc0611b2676b8e1df05db7037549febe85b860fa48e47536a01fa3bfa37976f42e47666065ba4198e903 autoconf-decl-checks.patch
217e7212345f4202bf7e136b2d5b347a9967ea10d15ef50a216bfcd8e4a522076e4ee2044d18a606baf670c0fe6a339951b6381cdb9047730e06987ab7796790 missing-decls.patch
diff --git a/main/opensmtpd/smtpd.initd b/main/opensmtpd/smtpd.initd
index 98881e8523..467dbff3e2 100644
--- a/main/opensmtpd/smtpd.initd
+++ b/main/opensmtpd/smtpd.initd
@@ -1,9 +1,13 @@
#!/sbin/openrc-run
+description_checkconfig="Check the configuration file for validity"
+
name="SMTP Server"
+
command=/usr/sbin/smtpd
-command_args="-F $SMTPD_OPTS"
+command_args="-F ${command_args:-$SMTPD_OPTS}" # SMTPD_OPTS is deprecated
command_background=yes
+
pidfile=/run/$RC_SVCNAME.pid
required_files=/etc/smtpd/smtpd.conf
@@ -13,3 +17,11 @@ depend() {
use logger dns
provide mta
}
+
+start_pre() {
+ checkconfig
+}
+
+checkconfig() {
+ $command -n
+}