Skip to content
Snippets Groups Projects
Commit 2c2cc3f9 authored by Greg DiCristofaro's avatar Greg DiCristofaro
Browse files

unix_setup improvements

parent 6cad1a4a
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,10 @@ echo "---------------------------------------------" ...@@ -35,6 +35,10 @@ echo "---------------------------------------------"
echo "Checking prerequisites and preparing ${APPLICATION_NAME}:" echo "Checking prerequisites and preparing ${APPLICATION_NAME}:"
echo "---------------------------------------------" echo "---------------------------------------------"
# make sure cwd is same as script's
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
pushd $SCRIPTPATH
# Verify PhotoRec was installed # Verify PhotoRec was installed
echo -n "Checking for PhotoRec..." echo -n "Checking for PhotoRec..."
photorec_filepath=/usr/bin/photorec photorec_filepath=/usr/bin/photorec
...@@ -53,7 +57,8 @@ echo -n "Checking for Java..." ...@@ -53,7 +57,8 @@ echo -n "Checking for Java..."
if [ -n "$JAVA_PATH" ]; then if [ -n "$JAVA_PATH" ]; then
if [ -x "$JAVA_PATH/bin/java" ]; then if [ -x "$JAVA_PATH/bin/java" ]; then
# only works on linux; not os x # only works on linux; not os x
sed -Ei '/^#?\s*jdkhome=.*$' "etc/$APPLICATION_NAME.conf" awk '!/^\s*#?\s*jdkhome=.*$/' etc/$APPLICATION_NAME.conf > etc/$APPLICATION_NAME.conf.tmp && \
mv etc/$APPLICATION_NAME.conf.tmp etc/$APPLICATION_NAME.conf && \
echo "jdkhome=$JAVA_PATH" >> etc/$APPLICATION_NAME.conf echo "jdkhome=$JAVA_PATH" >> etc/$APPLICATION_NAME.conf
else else
echo "ERROR: Java was not found in $JAVA_PATH." echo "ERROR: Java was not found in $JAVA_PATH."
...@@ -113,6 +118,8 @@ chmod -R u+x autopsy/solr/bin ...@@ -113,6 +118,8 @@ chmod -R u+x autopsy/solr/bin
# make sure it is executable # make sure it is executable
chmod u+x bin/$APPLICATION_NAME chmod u+x bin/$APPLICATION_NAME
popd
echo echo
echo "Application is now configured. You can execute bin/$APPLICATION_NAME to start it" echo "Application is now configured. You can execute bin/$APPLICATION_NAME to start it"
echo echo
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment