Incorporated changes for release 1.1.2

This commit is contained in:
2026-02-14 11:44:10 -05:00
parent 16d1ff9bb8
commit 39931c0ca5
11 changed files with 782 additions and 545 deletions

View File

@@ -2,7 +2,7 @@
# server-setup.sh
# OpenDRS Online Discrepancy Reporting System
# Copyright (C) 2020 Rod Wright
# Copyright (C) 2021 Rod Wright
# SPDX-License-Identifier: GPL-2.0
@@ -30,10 +30,22 @@ fi
echo "It looks like you have. Continuing."
echo ""
echo ""
echo "Updating Raspbian..."
echo "Updating Raspberry Pi OS..."
sleep 10
echo ""
echo ""
echo ""
echo ""
apt update && apt dist-upgrade -y
echo ""
echo ""
echo ""
echo ""
echo "...done."
sleep 10
echo ""
echo ""
echo ""
echo ""
echo "IMPORTANT!: Be sure to make note of usernames and passwords you provide below."
echo "You will need them later."
@@ -43,7 +55,10 @@ echo "automatically. Choose Yes when prompted to install phpmyadmin database and
echo "generate a random password(leave the field blank)."
echo -n "Press enter to continue."
read continueok
sleep 10
echo ""
echo ""
echo ""
echo ""
apt install -y apache2 php php-mcrypt mariadb-server phpmyadmin uuid-runtime
cp etc/apache2/mods-available/alias.conf /etc/apache2/mods-available
service apache2 restart
@@ -54,6 +69,10 @@ echo "Configuring the mysql installation. Accept the defaults at the following p
echo "Remember the password you set here. You'll need it during the OpenDRS install."
echo -n "Press enter to proceed."
read continueok
echo ""
echo ""
echo ""
echo ""
mysql_secure_installation
mysql mysql -e "update user set plugin='';flush privileges;"
echo ""
@@ -94,9 +113,15 @@ echo "What would you like to call this installation of OpenDRS? If you accept"
echo "the default, it will be called $inst_name. If you will be running multiple"
echo "instances of OpenDRS on this server, you should choose a distinctive name."
echo -n "Installation name [$inst_name]: "
read inst_name
read inst_name_in
if [ "$inst_name_in" != "" ]
then
inst_name=$inst_name_in
fi
echo ""
echo ""
echo ""
echo ""
# Create initial database
db_create_fail=1
while [ $db_create_fail -eq 1 ]
@@ -156,7 +181,17 @@ export MYSQL_PWD="$drs_pass"
mysql -u"$drs_user" $new_db_name -e "update config set value=\"$inst_name\",defaultvalue=\"$inst_name\" where name=\"app_name\""
# Create install path
echo ""
echo ""
echo ""
echo ""
echo "Creating installation directory . . ."
echo ""
echo ""
echo ""
echo ""
echo "Installing to $docroot_path/$inst_name"
sleep 10
install_path=$docroot_path/$inst_name
mkdir $install_path
@@ -173,6 +208,10 @@ fi
echo "Installing distribution . . ."
cp -Rv ../distfiles/* $install_path
ln -s $install_path/writeups.php $install_path/index.php
echo ""
echo ""
echo ""
echo ""
# set ownership
echo "In order to set the ownership correctly, we need to know the user and"
@@ -182,7 +221,11 @@ echo "your webserver's document tree to see what this should be."
echo "Enter the user and group separated by a colon (username:groupname)."
echo "Enter the user:group of the OpenDRS installation"
echo -n "directory [$apache_user:$apache_group] :"
read httpd_user_group
read httpd_user_group_in
if [ "$http_user_group_in" != "" ]
then
http_user_group=$http_user_group_in
fi
echo ""
echo "Setting file ownership . . ."
chown -R $httpd_user_group $install_path