Skip to content

Commit

Permalink
updated pre/post scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhangui committed Jul 1, 2023
1 parent 83f0ce4 commit 4472754
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
26 changes: 15 additions & 11 deletions indimail-auth/debian/postinst.in
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,17 @@ if [ $upgrade -eq 1 ] ; then # upgrade
${prefix}/sbin/svctool --servicedir=${servicedir} --refreshsvc="${servicedir}/pwdlookup"
set +e
if [ -d /run ] ; then
rundir=/run
rundir=/run/svscan
nssd_sock="/run/indimail/pwdlookup/nssd.sock"
mkdir -p /run/indimail
mkdir -p /run/indimail/pwdlookup
elif [ -d /var/run ] ; then
rundir=/var/run
rundir=/var/run/svscan
nssd_sock="/var/run/indimail/pwdlookup/nssd.sock"
mkdir -p /var/run/indimail
mkdir -p /var/run/indimail/pwdlookup
else
rundir=${servicedir}
nssd_sock="/tmp/pwdlookup/nssd.sock"
mkdir -p /tmp/pwdlookup
mkdir -p /tmp/pwdlookup
fi

grep "pwdlookup/nssd.sock" ${servicedir}/pwdlookup/variables/.options >/dev/null
Expand All @@ -102,16 +102,20 @@ echo " 1. Configure ${logdir} for multilog"
echo " 2. Configure ${servicedir}"
echo " 3. Configure ${sysconfdir}/nssd.conf for nssd"
echo " 4. Configure nssd service"
echo " 5. Configure pam-multi as alternative for SMTP auth"
echo ""

if [ -x /bin/touch ] ; then
TOUCH=/bin/touch
elif [ -x /usr/bin/touch ] ; then
TOUCH=/usr/bin/touch
(
if [ -d /run ] ; then
nssd_sock="/run/indimail/pwdlookup/nssd.sock"
mkdir -p /run/indimail/pwdlookup
elif [ -d /var/run ] ; then
nssd_sock="/var/run/indimail/pwdlookup/nssd.sock"
mkdir -p /var/run/indimail/pwdlookup
else
TOUCH=/bin/touch
nssd_sock="/tmp/pwdlookup/nssd.sock"
mkdir -p /tmp/pwdlookup
fi
(
echo "installing indimail-auth package"
echo "Creating ${logdir}"
if [ ! -d ${logdir}/pwdlookup ] ; then
Expand Down
6 changes: 3 additions & 3 deletions indimail-auth/debian/preinst.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ servicedir=@servicedir@
case "$1" in
upgrade)
if [ -d /run ] ; then
rundir=/run
rundir=/run/svscan
elif [ -d /var/run ] ; then
rundir=/var/run
rundir=/var/run/svscan
else
rundir=${servicedir}
fi
if [ -f ${prefix}/bin/svstat ] ; then
if [ ! -f ${servicedir}/pwdlookup/down ] ; then
set +e
${prefix}/bin/svstat ${servicedir}/pwdlookup >/dev/null 2>&1
if [ $? -eq 0 ] ; then
Expand Down
2 changes: 2 additions & 0 deletions indimail-auth/doc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Release 1.0.1-1.1 Start 07/06/2023 End XX/XX/XXXX
03. nssd.c: re-formatted debug statements
- 08/06/2023
04. nssd.c: refactored code
- 01/07/2023
05. updated indimail-auth.spec, debian/preinst, debian/postinst

* Sun 14 May 2023 11:24:48 +0000 Manvendra Bhangui <[email protected]> 1.0.0-1.1%{?dist}
Release 1.0.0-1.1 Start 21/05/2020 End 14/05/2023
Expand Down
5 changes: 3 additions & 2 deletions indimail-auth/indimail-auth.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,9 @@ echo "Doing Post Install"
echo ""
echo " 1. Configure %{logdir} for multilog"
echo " 2. Configure %{servicedir}"
echo " 3. Configure nssd service"
echo " 4. Configure pam-multi as alternative for SMTP auth"
echo " 3. Configure ${sysconfdir}/nssd.conf for nssd"
echo " 4. Configure nssd service"
echo " 5. Configure pam-multi as alternative for SMTP auth"
echo ""

(
Expand Down

0 comments on commit 4472754

Please sign in to comment.