Skip to content

Commit

Permalink
update configure script to check for existence of /run before assigni…
Browse files Browse the repository at this point in the history
…ng default lock file value
  • Loading branch information
hedenface committed Aug 17, 2017
1 parent 6c14da6 commit c3aec1f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions configure.ac
Expand Up @@ -265,11 +265,19 @@ AC_ARG_WITH(init_dir,
AC_SUBST(init_dir)

dnl User can override lock file location
dnl Use the /var/run/ path by default
dnl and use /run if it is available

default_lockfile_path=/var/run/nagios.lock
if test -d /run; then
default_lockfile_path=/run/nagios.lock
fi

AC_ARG_WITH(lockfile,
AC_HELP_STRING([--with-lockfile=<path>],
[sets path for lock file (default: /run/nagios.lock)]),
[sets path for lock file (default: [/var]/run/nagios.lock)]),
lockfile=$withval,
lockfile=/run/nagios.lock
lockfile=$default_lockfile_path
)
AC_SUBST(lockfile)

Expand Down

0 comments on commit c3aec1f

Please sign in to comment.