Commit 47b9ff12 authored by Jakub Jirutka's avatar Jakub Jirutka

main/opensmtpd: improve runscript, add checkconfig

parent c9cfe39e
......@@ -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
......
#!/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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment