diff --git a/README.md b/README.md index d1bb367..6a161f1 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Fedora 4 Vagrant Virtual Machine * user account `testuser`, with password `password1` * user account `adminuser`, with password `password2` * admin account `fedoraAdmin` with the password `secret3` +* (optional) to enable fedora internal audit capability, edit `install_scripts/config` and change the FEDORA_AUDIT variable to true. The FEDORA_AUDIT_LOCATION can also be changed from its default "/audit", if necessary. * `vagrant up` ###Support diff --git a/install_scripts/config b/install_scripts/config index b2e840f..5c1a2b8 100644 --- a/install_scripts/config +++ b/install_scripts/config @@ -13,9 +13,12 @@ if [ ! -d $DOWNLOAD_DIR ]; then fi FEDORA_VERSION=4.1.2-SNAPSHOT -FEDORA_TAG=4.1.1-audit.0 +FEDORA_TAG=4.1.1-audit.1 # true to enable auth, false to disable it FEDORA_AUTH=false +FEDORA_AUDIT=true +FEDORA_AUDIT_LOCATION=/audit + FUSEKI_VERSION=1.1.2 FUSEKI_HOME=/usr/share/fuseki diff --git a/install_scripts/fedora4.sh b/install_scripts/fedora4.sh index d7bc592..d967415 100644 --- a/install_scripts/fedora4.sh +++ b/install_scripts/fedora4.sh @@ -10,10 +10,16 @@ if [ -f "$SHARED_DIR/install_scripts/config" ]; then . $SHARED_DIR/install_scripts/config fi -if [ "${FEDORA_AUTH}" = "true" ]; then +if [ "${FEDORA_AUTH}" = "true" ] && [ "${FEDORA_AUDIT}" = "true" ]; then + WEBAPP="fcrepo-webapp-plus-rbacl-audit-${FEDORA_VERSION}.war" + RELEASES="https://github.com/fcrepo4-labs/fcrepo-webapp-plus/releases/download/fcrepo-webapp-plus-${FEDORA_TAG}" +elif [ "${FEDORA_AUTH}" = "true" ]; then WEBAPP="fcrepo-webapp-plus-rbacl-${FEDORA_VERSION}.war" RELEASES="https://github.com/fcrepo4-labs/fcrepo-webapp-plus/releases/download/fcrepo-webapp-plus-${FEDORA_TAG}" -else +elif [ "${FEDORA_AUDIT}" = "true" ]; then + WEBAPP="fcrepo-webapp-plus-audit-${FEDORA_VERSION}.war" + RELEASES="https://github.com/fcrepo4-labs/fcrepo-webapp-plus/releases/download/fcrepo-webapp-plus-${FEDORA_TAG}" +else WEBAPP="fcrepo-webapp-${FEDORA_VERSION}.war" RELEASES="https://github.com/fcrepo4/fcrepo4/releases/download/fcrepo-${FEDORA_TAG}" fi @@ -25,10 +31,17 @@ chown tomcat7:tomcat7 /var/lib/tomcat7/fcrepo4-data chmod g-w /var/lib/tomcat7/fcrepo4-data if [ ! -f "$DOWNLOAD_DIR/$WEBAPP" ]; then - echo -n "Downloading Fedora 4... ${FEDORA_VERSION}" + echo -n "Downloading Fedora 4... $RELEASES/$WEBAPP" curl -L -s -o "$DOWNLOAD_DIR/$WEBAPP" "$RELEASES/$WEBAPP" echo " done" fi + cp "$DOWNLOAD_DIR/$WEBAPP" /var/lib/tomcat7/webapps/fcrepo.war chown tomcat7:tomcat7 /var/lib/tomcat7/webapps/fcrepo.war + +if [ "${FEDORA_AUDIT}" = "true" ]; then + echo $'\n' >> /etc/default/tomcat7; + echo "CATALINA_OPTS=\"-Dfcrepo.audit.container=/audit\"" >> /etc/default/tomcat7; +fi + service tomcat7 restart