Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3758354
D3591.id9254.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D3591.id9254.diff
View Options
diff --git a/roles/mailserver/dkim/files/rc/opendkim b/roles/mailserver/dkim/files/rc/opendkim
new file mode 100644
--- /dev/null
+++ b/roles/mailserver/dkim/files/rc/opendkim
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+# PROVIDE: opendkim
+# REQUIRE: DAEMON
+# BEFORE: mail
+# KEYWORD: shutdown
+
+# -------------------------------------------------------------
+# dkim :: opendkim
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/mailserver/dkim/files/rc/opendkim
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+# opendkim_enable (bool): Set it to YES to enable api_exec.
+# Default is "NO"
+# opendkim_user (user): Set user to run opendkim
+# Default is "opendkim".
+# opendkim_group (group): Set user to run opendkim
+# Default is "mail".
+# opendkim_config (config file path): Set config to run opendkim
+# Default is "/usr/local/etc/opendkim/opendkim.conf".
+# opendkim_perms (perms): Set config to run opendkim
+# Default is "0755".
+
+. /etc/rc.subr
+
+name="opendkim"
+rcvar="${name}_enable"
+
+load_rc_config $name
+
+: ${opendkim_enable:="NO"}
+: ${opendkim_user:="opendkim"}
+: ${opendkim_group:="mail"}
+: ${opendkim_config:="/usr/local/etc/opendkim/opendkim.conf"}
+: ${opendkim_perms:="0755"}
+
+pidfile="/var/run/opendkim.pid"
+socketfile="/var/run/opendkim.sock"
+command="/usr/local/sbin/opendkim"
+command_args="-l -u ${opendkim_user}:${opendkim_group} -P ${pidfile} -x ${opendkim_config}"
+
+sig_stop="INT"
+start_precmd=opendkim_exec_startprecmd
+stop_postcmd=opendkim_exec_stop_postcmd
+
+opendkim_exec_startprecmd()
+{
+ touch ${pidfile}
+ chown ${opendkim_user} ${pidfile}
+ install -d -o ${opendkim_user} -g ${opendkim_group} -m ${opendkim_perms} ${socketfile}
+}
+
+opendkim_exec_stop_postcmd()
+{
+ rm -f ${pidfile}
+ rm -f ${socketfile}
+}
+
+run_rc_command "$1"
diff --git a/roles/mailserver/dkim/files/rc/milteropendkim.conf b/roles/mailserver/dkim/files/rc/opendkim.conf
rename from roles/mailserver/dkim/files/rc/milteropendkim.conf
rename to roles/mailserver/dkim/files/rc/opendkim.conf
--- a/roles/mailserver/dkim/files/rc/milteropendkim.conf
+++ b/roles/mailserver/dkim/files/rc/opendkim.conf
@@ -13,7 +13,4 @@
# and will be lost if the state is redeployed.
# </auto-generated>
-milteropendkim_enable="YES"
-milteropendkim_uid="{{ user }}"
-milteropendkim_gid="{{ group }}"
-milteropendkim_cfgfile="{{ config }}"
+opendkim_enable="YES"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 20, 11:01 (3 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2253145
Default Alt Text
D3591.id9254.diff (2 KB)
Attached To
Mode
D3591: Init OpenDKIM service
Attached
Detach File
Event Timeline
Log In to Comment