- From PR
If a user opts out of the first part of the pkg-install script, but elects to interact with the second part of the script and decides to create new certs, the creation of the certs will fail silently if the certs directory does not exist. This is because the certs directory is created (if necessary) in the pre-install portion of the pkg-install script, but the certs are created in the post-install part of the script. This PR corrects this problem by moving the creation of the certs directory to the same subroutine that the certs are created in. PR: ports/123883 Submitted by: Paul Schmehl <pauls at utdallas.edu> (maintainer)
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= sguil-server
|
||||
PORTVERSION= 0.7.0
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= SF
|
||||
MASTER_SITE_SUBDIR= sguil
|
||||
|
||||
@@ -77,13 +77,6 @@ esac
|
||||
pw usershow ${sguil_user}
|
||||
fi
|
||||
fi
|
||||
for dir in %%SGUILDIR%%/certs ; do
|
||||
if [ ! -d ${confdir}/${dir} ]; then
|
||||
echo "Creating ${confdir}/${dir} ...."
|
||||
install -d -o ${sguil_user} -g ${sguil_group} \
|
||||
-m 0750 ${confdir}/${dir}
|
||||
fi
|
||||
done
|
||||
for dir in %%PREFIX%%/lib/%%SGUILDIR%% /var/run/%%SGUILDIR%% ; do
|
||||
if [ ! -d ${dir} ]; then
|
||||
echo "Creating ${dir} ...."
|
||||
@@ -123,6 +116,13 @@ esac
|
||||
echo "Would you like to create certs now? (y for yes, n for no)"; read ans
|
||||
case "$ans" in
|
||||
y*|Y*)
|
||||
for dir in %%SGUILDIR%%/certs ; do
|
||||
if [ ! -d ${confdir}/${dir} ]; then
|
||||
echo "Creating ${confdir}/${dir} ...."
|
||||
install -d -o ${sguil_user} -g ${sguil_group} \
|
||||
-m 0750 ${confdir}/${dir}
|
||||
fi
|
||||
done
|
||||
echo -e "\033[1mFirst we need to create a password-protected CA cert."
|
||||
echo ""
|
||||
echo -e "\033[0m(The Common Name should be the FQHN of your squil server.)"
|
||||
|
||||
Reference in New Issue
Block a user