diff options
author | obache <obache> | 2010-05-28 07:26:48 +0000 |
---|---|---|
committer | obache <obache> | 2010-05-28 07:26:48 +0000 |
commit | 15e571517cdb8870a0a942106d04234bc4337741 (patch) | |
tree | 078bbe615765040f70428a12728f010fe0305bc7 /mail/enma/files | |
parent | f66c5c5d71e8ae1c991c654309a9891a85192ec9 (diff) | |
download | pkgsrc-15e571517cdb8870a0a942106d04234bc4337741.tar.gz |
Create required directory in pre-start stage,
/var/run may be cleared at boot.
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" |