mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-18 20:47:58 +00:00
moved logs to /var/log/hirs
This commit is contained in:
parent
383fefdfef
commit
172236a75b
@ -24,9 +24,9 @@ server.servlet.context-path=/HIRS_AttestationCAPortal
|
||||
spring.mvc.servlet.path=/portal
|
||||
|
||||
server.tomcat.accesslog.enabled=true
|
||||
server.tomcat.accesslog.directory=logs
|
||||
server.tomcat.accesslog.directory=/var/log/hirs
|
||||
server.tomcat.accesslog.file-date-format=yyyy-MM-dd
|
||||
server.tomcat.accesslog.prefix=access_log
|
||||
server.tomcat.accesslog.prefix=Tomcat_accesslog_
|
||||
server.tomcat.accesslog.suffix=.log
|
||||
server.tomcat.accesslog.rotate=true
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
<Console name="STDOUT" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%C.%M] %-5p : %m%n"/>
|
||||
</Console>
|
||||
<RollingFile name="FILE" fileName="./logs/HIRS_AttestationCA_Portal.log"
|
||||
<RollingFile name="FILE" fileName="/var/log/hirs/HIRS_AttestationCA_Portal.log"
|
||||
filePattern="./logs/HIRS_AttestationCA_Portal.log-%d{yyyy-MM-dd}-%i.log" >
|
||||
<PatternLayout>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%C.%M] %-5p : %m%n</pattern>
|
||||
|
@ -1,10 +1,13 @@
|
||||
#!/bin/bash
|
||||
# Capture location of the script to allow from invocation from any location
|
||||
SCRIPT_DIR=$( dirname -- "$( readlink -f -- "$0"; )"; )
|
||||
PROP_FILE='../../../HIRS_AttestationCAPortal/src/main/resources/application.properties'
|
||||
CONF_DIR=/etc/hirs/aca
|
||||
SPRING_PROP_FILE='../../../HIRS_AttestationCAPortal/src/main/resources/application.properties'
|
||||
HIRS_CONF_DIR=/etc/hirs/aca
|
||||
LOG_FILE_NAME="hirs_aca_install_"$(date +%Y-%m-%d).log
|
||||
LOG_DIR="/opt/embeddedtomcat/logs/"
|
||||
LOG_DIR="/var/log/hirs/"
|
||||
HIRS_PROP_DIR="/opt/hirs/default-properties"
|
||||
COMP_JSON='../../../HIRS_AttestationCA/src/main/resources/component-class.json'
|
||||
VENDOR_TABLE='../../../HIRS_AttestationCA/src/main/resources/vendor-table.json'
|
||||
LOG_FILE="$LOG_DIR$LOG_FILE_NAME"
|
||||
echo "LOG_FILE is $LOG_FILE"
|
||||
|
||||
@ -13,15 +16,18 @@ if [ "$EUID" -ne 0 ]
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p $HIRS_CONF_DIR $LOG_DIR $HIRS_PROP_DIR
|
||||
|
||||
echo "HIRS ACA Setup initiated on $(date +%Y-%m-%d)" > "$LOG_FILE"
|
||||
|
||||
mkdir -p $CONF_DIR $LOG_DIR
|
||||
pushd $SCRIPT_DIR &>/dev/null
|
||||
|
||||
pushd $SCRIPT_DIR
|
||||
|
||||
# If setup for development start with basic spring config
|
||||
if [ -f $PROP_FILE ]; then
|
||||
cp $PROP_FILE $CONF_DIR/.
|
||||
# Copy HIRS configuration and data files if not a package install
|
||||
if [ -f $SPRING_PROP_FILE ]; then
|
||||
cp -n $SPRING_PROP_FILE $HIRS_CONF_DIR/.
|
||||
cp -n $COMP_JSON $HIRS_PROP_DIR/.
|
||||
cp -n $VENDOR_TABLE $HIRS_PROP_DIR/.
|
||||
fi
|
||||
|
||||
sh ../db/db_create.sh $LOG_FILE
|
||||
@ -41,4 +47,4 @@ fi
|
||||
|
||||
echo "ACA setup complete" | tee -a "$LOG_FILE"
|
||||
|
||||
popd
|
||||
popd &>/dev/null
|
Loading…
Reference in New Issue
Block a user