diff options
Diffstat (limited to 'mail/enma/files')
-rw-r--r-- | mail/enma/files/enma.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mail/enma/files/enma.sh b/mail/enma/files/enma.sh index 68b83c82a32..cb618bba0d8 100644 --- a/mail/enma/files/enma.sh +++ b/mail/enma/files/enma.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: enma.sh,v 1.2 2009/04/09 02:25:37 obache Exp $ +# $NetBSD: enma.sh,v 1.3 2010/05/28 07:26:48 obache Exp $ # # PROVIDE: enma # REQUIRE: NETWORK @@ -15,5 +15,17 @@ pidfile="@VARBASE@/run/enma/${name}.pid" required_files="@PKG_SYSCONFDIR@/enma.conf" command_args="-c @PKG_SYSCONFDIR@/enma.conf" +start_precmd="${name}_prestart" + +enma_prestart() +{ + if [ ! -d @VARBASE@/run/enma ]; then + @MKDIR@ @VARBASE@/run/enma + @CHOWN@ @ENMA_USER@ @VARBASE@/run/enma + @CHGRP@ @ENMA_GROUP@ @VARBASE@/run/enma + @CHMOD@ 0700 @VARBASE@/run/enma + fi +} + load_rc_config ${name} run_rc_command "$1" |