Compare commits
2 Commits
1.1.1
...
v1.1.2-dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 39931c0ca5 | |||
| 16d1ff9bb8 |
49
CHANGELOG
@@ -27,17 +27,46 @@ Changelog
|
|||||||
back button in terminal mode.
|
back button in terminal mode.
|
||||||
- Added configurable help text for period effective selection.
|
- Added configurable help text for period effective selection.
|
||||||
- Changed Sim period effective from selection to yes/no radio buttons.
|
- Changed Sim period effective from selection to yes/no radio buttons.
|
||||||
- Writeup groups page shows collapsed list of groups. Click the expand icon
|
- Writeup groups page shows collapsed list of groups. Click the expand
|
||||||
to expand each group.
|
icon to expand each group.
|
||||||
- Fixed bug where entries made on stale create page had inaccurate date/time.
|
- Fixed bug where entries made on stale create page had inaccurate
|
||||||
- For logged in users, added the ability to select writeups directly on the
|
date/time.
|
||||||
View All Writeups page and assign/create a group.
|
- For logged in users, added the ability to select writeups directly on
|
||||||
- On the Create New Writeup page, removed the default selections for Device,
|
the View All Writeups page and assign/create a group.
|
||||||
Subsystem, and Period dropdowns, forcing user to make a selection.
|
- On the Create New Writeup page, removed the default selections for
|
||||||
|
Device, Subsystem, and Period dropdowns, forcing user to make a
|
||||||
|
selection.
|
||||||
- Added a Today button to the View All Writeups page
|
- Added a Today button to the View All Writeups page
|
||||||
- Changed the Period dropdowns on the Create, Search, and Group pages to show
|
- Changed the Period dropdowns on the Create, Search, and Group pages to
|
||||||
the times instead of the period numbers. Period numbers are still shown
|
show the times instead of the period numbers. Period numbers are
|
||||||
in the results tables with mouse hover showing times.
|
still shown in the results tables with mouse hover showing times.
|
||||||
- Moved all installation/upgrade functions to the install.sh script.
|
- Moved all installation/upgrade functions to the install.sh script.
|
||||||
|
|
||||||
|
1.1.1 - 2020-04-09
|
||||||
|
- Fixed opendrs-update.sql to rename the trainers table.
|
||||||
|
- Fixed bug where the About page didn't show the version number.
|
||||||
|
- Fixed some grammar on the About page.
|
||||||
|
- Fixed hardcoded help text in groups.php to use constant from config.
|
||||||
|
- Added ID to searchable parameters in search.php.
|
||||||
|
- Added sort parameters to search results.
|
||||||
|
- Added a link for Admins to access the local Webmin to manage a terminal.
|
||||||
|
- For Raspberry Pi:
|
||||||
|
- In terminal setup, provided missing .profile and
|
||||||
|
.config/openbox/rc.xml files.
|
||||||
|
- In server setup, install mariadb-server since
|
||||||
|
mysql-server is obsolete.
|
||||||
|
- Changed startdrs.sh to re-enable ctrl keys for copy/paste, etc. Also
|
||||||
|
added chromium flags to prevent update popup.
|
||||||
|
- Added openbox keybindings to customer user's rc.xml to trap dangerous
|
||||||
|
chromium hotkey combinations and enable ctrl-alt-del reboot.
|
||||||
|
- Changed systemd ctrl-alt-del.target symlink to point to
|
||||||
|
reboot.target.
|
||||||
|
|
||||||
|
1.1.2 - 2021-04-28
|
||||||
|
- Added ability to export search results as a CSV file.
|
||||||
|
- Fixed bug in server-setup.sh that resulted in an incorrect install
|
||||||
|
location if the installation name was left at the default.
|
||||||
|
- Fixed bug in server-setup.sh that resulted in failure to set the
|
||||||
|
ownership of the installed server directory tree if the http
|
||||||
|
user and group names were left at the default.
|
||||||
|
- Updated and tested to support Raspberry Pi 4B hardware.
|
||||||
|
|||||||
2
INSTALL
@@ -14,7 +14,7 @@ follow the prompts.
|
|||||||
4. Log in
|
4. Log in
|
||||||
Click on the Log In menu option on the main page. If this is a fresh
|
Click on the Log In menu option on the main page. If this is a fresh
|
||||||
installation The initial user is drsadmin and the initial password
|
installation The initial user is drsadmin and the initial password
|
||||||
is OpenDRS-1. It is highly recommended that you changethis password
|
is OpenDRS-1. It is highly recommended that you change this password
|
||||||
to a strong one by going to the Manage Database page under the
|
to a strong one by going to the Manage Database page under the
|
||||||
Admin Functions menu. If this an upgrade, your current usernames and
|
Admin Functions menu. If this an upgrade, your current usernames and
|
||||||
passwords are unchanged.
|
passwords are unchanged.
|
||||||
|
|||||||
@@ -2,10 +2,15 @@
|
|||||||
|
|
||||||
# server-setup.sh
|
# server-setup.sh
|
||||||
# OpenDRS Online Discrepancy Reporting System
|
# OpenDRS Online Discrepancy Reporting System
|
||||||
# Copyright (C) 2018 Rod Wright
|
# Copyright (C) 2021 Rod Wright
|
||||||
|
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
inst_name="OpenDRS"
|
||||||
|
docroot_path="/var/www"
|
||||||
|
apache_user="www-data"
|
||||||
|
apache_group="www-data"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
@@ -25,19 +30,36 @@ fi
|
|||||||
echo "It looks like you have. Continuing."
|
echo "It looks like you have. Continuing."
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Updating Raspbian..."
|
echo "Updating Raspberry Pi OS..."
|
||||||
sleep 10
|
sleep 10
|
||||||
apt update && apt dist-upgrade -y
|
|
||||||
echo "...done."
|
|
||||||
echo ""
|
echo ""
|
||||||
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."
|
||||||
|
echo ""
|
||||||
echo "Installing required server packages. Select apache2 as the web server to configure"
|
echo "Installing required server packages. Select apache2 as the web server to configure"
|
||||||
echo "automatically. Choose Yes when prompted to install phpmyadmin database and allow it to"
|
echo "automatically. Choose Yes when prompted to install phpmyadmin database and allow it to"
|
||||||
echo "generate a random password(leave the field blank)."
|
echo "generate a random password(leave the field blank)."
|
||||||
echo -n "Press enter to continue."
|
echo -n "Press enter to continue."
|
||||||
read continueok
|
read continueok
|
||||||
sleep 10
|
echo ""
|
||||||
apt install -y apache2 php php-mcrypt mysql-server phpmyadmin
|
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
|
cp etc/apache2/mods-available/alias.conf /etc/apache2/mods-available
|
||||||
service apache2 restart
|
service apache2 restart
|
||||||
echo "...done."
|
echo "...done."
|
||||||
@@ -47,38 +69,200 @@ 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 "Remember the password you set here. You'll need it during the OpenDRS install."
|
||||||
echo -n "Press enter to proceed."
|
echo -n "Press enter to proceed."
|
||||||
read continueok
|
read continueok
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
mysql_secure_installation
|
mysql_secure_installation
|
||||||
mysql mysql -e "update user set plugin='';flush privileges;"
|
mysql mysql -e "update user set plugin='';flush privileges;"
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Installing OpenDRS."
|
|
||||||
DRS_VERSION="1.1.0"
|
# This is a fresh install
|
||||||
install_path="/var/www/opendrs-$DRS_VERSION"
|
operation="installed"
|
||||||
httpd_user_group="www-data:www-data"
|
# prompt for mysql information
|
||||||
new_link_name="/var/www/opendrs"
|
bad_mysql_adm=1
|
||||||
|
while [ $bad_mysql_adm -eq 1 ]
|
||||||
|
do
|
||||||
|
admintestdb="drsadm`date +%Y%m%d`"
|
||||||
|
echo "We need to know the username and password of a MySQL administrator"
|
||||||
|
echo "to be able to create the database and user for OpenDRS. Note that this"
|
||||||
|
echo "is not necessarily the same as the login and password for the computer."
|
||||||
|
echo -n "MySQL admin username: "
|
||||||
|
read mysql_adm_user
|
||||||
|
echo ""
|
||||||
|
echo -n "MySQL admin password: "
|
||||||
|
read -s mysql_adm_pass
|
||||||
|
export MYSQL_PWD="$mysql_adm_pass"
|
||||||
|
mysql -u"$mysql_adm_user" -e "create database $admintestdb;drop database $admintestdb"
|
||||||
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
|
bad_mysql_adm=0
|
||||||
|
else
|
||||||
|
echo "ERROR: Either the username/password you supplied were incorrect or the user"
|
||||||
|
echo -n "is not a MySQL administrator. Try again? [Y/N]: "
|
||||||
|
read admtry
|
||||||
|
if [ "$admtry" != "Y" -o "$admtry" != "y" ]
|
||||||
|
then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
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_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 ]
|
||||||
|
do
|
||||||
|
name_valid=0
|
||||||
|
while [ $name_valid -eq 0 ]
|
||||||
|
do
|
||||||
|
echo "What would you like to call the database for this installation of OpenDRS?"
|
||||||
|
echo "If you accept the default or make it blank, it will be $inst_name."
|
||||||
|
echo "Spaces or special characters are not allowed in the name."
|
||||||
|
echo -n "database name [$inst_name]: "
|
||||||
|
read new_db_name
|
||||||
|
if [ "$new_db_name" = "" ]
|
||||||
|
then
|
||||||
|
new_db_name=$inst_name
|
||||||
|
fi
|
||||||
|
echo $new_db_name|egrep -q "\W"
|
||||||
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
|
echo "The name you entered seems to contain whitespace or special"
|
||||||
|
echo "characters. Try again or just accept the default."
|
||||||
|
else
|
||||||
|
name_valid=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo ""
|
||||||
|
export MYSQL_PWD="$mysql_adm_pass"
|
||||||
|
mysql -u"$mysql_adm_user" -e "create database $new_db_name"
|
||||||
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
|
db_create_fail=0
|
||||||
|
else
|
||||||
|
echo "An error was encountered when trying to create the database."
|
||||||
|
echo "This probably means the database already exists."
|
||||||
|
echo -n "Try again with a different database name? [Y/N]: "
|
||||||
|
read dbcreatetry
|
||||||
|
if [ "$dbcreatetry" != "Y" -o "$dbcreatetry" != "y" ]
|
||||||
|
then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Create user and give rights to database
|
||||||
|
drs_user="$new_db_name-user"
|
||||||
|
drs_pass=`uuidgen`
|
||||||
|
export MYSQL_PWD="$mysql_adm_pass"
|
||||||
|
mysql -u"$mysql_adm_user" -e "create user if not exists '$drs_user'@'localhost' identified by '$drs_pass'"
|
||||||
|
mysql -u"$mysql_adm_user" -e "grant all on $new_db_name.* to '$drs_user'@'localhost'"
|
||||||
|
mysql -u"$mysql_adm_user" -e "flush privileges"
|
||||||
|
|
||||||
|
# Populate initial database
|
||||||
|
mysql -u"$mysql_adm_user" $new_db_name < ../opendrs-initial.sql
|
||||||
|
|
||||||
|
# Set the installation name
|
||||||
|
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 "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
|
mkdir $install_path
|
||||||
|
|
||||||
|
# Create db.php if it doesn't exist
|
||||||
|
if [ ! -f "$install_path/db.php" ]
|
||||||
|
then
|
||||||
|
cp ../db.php.template $install_path/db.php
|
||||||
|
sed -i "s/DBNAME/$new_db_name/g" $install_path/db.php
|
||||||
|
sed -i "s/DBUSER/$drs_user/g" $install_path/db.php
|
||||||
|
sed -i "s/DBPASS/$drs_pass/g" $install_path/db.php
|
||||||
|
fi
|
||||||
|
|
||||||
|
# copy distribution to install location
|
||||||
echo "Installing distribution . . ."
|
echo "Installing distribution . . ."
|
||||||
cp -Rv ../distfiles/* $install_path
|
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"
|
||||||
|
echo "group that the webserver expects its files to be owned by. This is"
|
||||||
|
echo "usually not the root account. Refer to the ownership of other files in"
|
||||||
|
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_in
|
||||||
|
if [ "$http_user_group_in" != "" ]
|
||||||
|
then
|
||||||
|
http_user_group=$http_user_group_in
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
echo "Setting file ownership . . ."
|
echo "Setting file ownership . . ."
|
||||||
chown -R $httpd_user_group $install_path
|
chown -R $httpd_user_group $install_path
|
||||||
ln -s $install_path $new_link_name
|
|
||||||
cp etc/apache2/conf-available/opendrs.conf /etc/apache2/conf-available
|
|
||||||
cp etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available
|
|
||||||
a2enconf opendrs
|
|
||||||
echo "DRS_SERVER=\"http://localhost\"" > /etc/drs.conf
|
|
||||||
service apache2 restart
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Server configuration is now complete. "
|
|
||||||
echo "Once the reboot is complete you will need to do the final installation of OpenDRS through"
|
# tell user to launch web browser to continue
|
||||||
echo "the browser. You will need the password you set during the mysql installation above."
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "It is highly recommended that after rebooting, you press ctrl-alt-F2,"
|
echo ""
|
||||||
echo "log in as pi, then create new users for yourself and any other"
|
echo "OpenDRS has been installed."
|
||||||
echo "administrators using the cloneuser command (cloneuser pi newlogin)."
|
|
||||||
|
echo "# OpenDRS default Apache configuration" > /etc/apache2/conf-available/$inst_name.conf
|
||||||
|
echo "" >> /etc/apache2/conf-available/$inst_name.conf
|
||||||
|
echo "Alias /$inst_name $install_path" >> /etc/apache2/conf-available/$inst_name.conf
|
||||||
|
echo "" >> /etc/apache2/conf-available/$inst_name.conf
|
||||||
|
echo "<Directory $install_path>" >> /etc/apache2/conf-available/$inst_name.conf
|
||||||
|
echo " Options FollowSymLinks" >> /etc/apache2/conf-available/$inst_name.conf
|
||||||
|
echo " DirectoryIndex index.php" >> /etc/apache2/conf-available/$inst_name.conf
|
||||||
|
echo "</Directory>" >> /etc/apache2/conf-available/$inst_name.conf
|
||||||
|
|
||||||
|
a2enconf $inst_name
|
||||||
|
service apache2 reload
|
||||||
|
echo "OpenDRS server setup is complete."
|
||||||
|
echo ""
|
||||||
|
echo "Once the reboot is complete you will need to do the final installation of $inst_name through"
|
||||||
|
echo "the browser. You will need the mysql username and password you set during the mysql installation above."
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo -n "Press enter to reboot now."
|
echo "Once the final install is done, you will need to log in to $inst_name to configure it."
|
||||||
read rebootok
|
echo "IMPORTANT: The default login credentials for the initial admin user are:"
|
||||||
reboot
|
echo ""
|
||||||
|
echo "login: drsadmin"
|
||||||
|
echo "password: OpenDRS-1"
|
||||||
|
echo ""
|
||||||
|
echo "REMEMBER THESE CREDENTIALS. Otherwise, you will not be able to log in and"
|
||||||
|
echo "configure your new installation."
|
||||||
|
echo "It is highly recommended that you change the initial password to something"
|
||||||
|
echo "secure after logging in for the first time."
|
||||||
|
echo "DRS_SERVER=\"http://localhost/$inst_name\"" > /etc/drs.conf
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# terminal-setup.sh
|
# terminal-setup.sh
|
||||||
# OpenDRS Online Maintenance Tracking System
|
# OpenDRS Online Maintenance Tracking System
|
||||||
# Copyright (C) 2018 Rod Wright
|
# Copyright (C) 2021 Rod Wright
|
||||||
|
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ echo ""
|
|||||||
echo ""
|
echo ""
|
||||||
echo "You should have already completed the following steps:"
|
echo "You should have already completed the following steps:"
|
||||||
echo ""
|
echo ""
|
||||||
echo "1. Created a Raspbian Lite SD card from the latest release."
|
echo "1. Created a Raspberry Pi OS Lite SD card from the latest release."
|
||||||
echo "2. Installed the card in a Raspberry Pi, booted it, and logged in as pi."
|
echo "2. Installed the card in a Raspberry Pi, booted it, and logged in as pi."
|
||||||
echo "3. Ran sudo raspi-config and :"
|
echo "3. Ran sudo raspi-config and :"
|
||||||
echo " a. Set a strong password for the pi user."
|
echo " a. Set a strong password for the pi user."
|
||||||
@@ -30,29 +30,48 @@ echo " f. Reboot when prompted and logged back in as pi."
|
|||||||
echo "4. Transferred the OpenDRS distribution package to /home/pi on the"
|
echo "4. Transferred the OpenDRS distribution package to /home/pi on the"
|
||||||
echo " Raspberry Pi and extracted it."
|
echo " Raspberry Pi and extracted it."
|
||||||
echo "5. Changed directory to RPiSetup in the the extracted distribution directory."
|
echo "5. Changed directory to RPiSetup in the the extracted distribution directory."
|
||||||
echo "6. Ran sudo ./terminal-setup.sh (this file)."
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "If you have completed these steps, press enter to continue. If not,"
|
echo "If you have completed these steps, press enter to continue. If not,"
|
||||||
echo -n "press ctrl-c to quit."
|
echo -n "press ctrl-c to quit."
|
||||||
read continueok
|
read continueok
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Updating Raspbian..."
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo "Updating Raspberry Pi OS..."
|
||||||
sleep 10
|
sleep 10
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
apt update && apt dist-upgrade -y
|
apt update && apt dist-upgrade -y
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
echo "...done."
|
echo "...done."
|
||||||
|
sleep 10
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
echo "Copying files..."
|
echo "Copying files..."
|
||||||
chmod +x usr/local/bin/*
|
chmod +x usr/local/bin/*
|
||||||
cp usr/local/bin/* /usr/local/bin
|
cp usr/local/bin/* /usr/local/bin
|
||||||
cp etc/apt/sources.list.d/* /etc/apt/sources.list.d
|
cp etc/apt/sources.list.d/* /etc/apt/sources.list.d
|
||||||
cp lib/systemd/system/getty@tty1.service /lib/systemd/system
|
cp lib/systemd/system/getty@tty1.service /lib/systemd/system
|
||||||
rm /lib/systemd/system/ctrl-alt-del.target
|
echo ""
|
||||||
ln -s /dev/null /lib/systemd/system/ctrl-alt-del.target
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
echo "...done."
|
echo "...done."
|
||||||
|
sleep 10
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Installing required terminal packages..."
|
echo "Installing required terminal packages..."
|
||||||
sleep 10
|
sleep 10
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
wget http://www.webmin.com/jcameron-key.asc
|
wget http://www.webmin.com/jcameron-key.asc
|
||||||
apt-key add jcameron-key.asc
|
apt-key add jcameron-key.asc
|
||||||
rm jcameron-key.asc
|
rm jcameron-key.asc
|
||||||
@@ -70,6 +89,10 @@ cd brlaser-master
|
|||||||
cmake . && make && make install
|
cmake . && make && make install
|
||||||
cd ..
|
cd ..
|
||||||
myhn=`hostname`
|
myhn=`hostname`
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
echo "Drivers have been installed for the Brother HL-L2300D printer that may come"
|
echo "Drivers have been installed for the Brother HL-L2300D printer that may come"
|
||||||
echo "with the terminal."
|
echo "with the terminal."
|
||||||
echo "After the terminal is set up and working, you can use another network"
|
echo "After the terminal is set up and working, you can use another network"
|
||||||
@@ -80,41 +103,45 @@ read continueok
|
|||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Creating customer user..."
|
echo "Creating customer user..."
|
||||||
cloneuser pi customer
|
sleep 10
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
cloneuser `who am i | awk '{print $1}'` customer
|
||||||
mkdir -p /home/customer/.config/openbox
|
mkdir -p /home/customer/.config/openbox
|
||||||
cp home/customer/.profile /home/customer
|
cp home/customer/.profile /home/customer
|
||||||
cp home/customer/.config/openbox/rc.xml /home/customer/.config/openbox
|
cp home/customer/.config/openbox/rc.xml /home/customer/.config/openbox
|
||||||
chown -R customer:customer /home/customer/.config /home/customer/.profile
|
chown -R customer:customer /home/customer/.config /home/customer/.profile
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
echo "...done."
|
echo "...done."
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "This terminal will need to communicate with an OpenDRS server. If"
|
echo "This terminal will need to communicate with an OpenDRS server. If"
|
||||||
echo "you intend to host the server directly on this terminal, accept the"
|
echo "you intend to host the server directly on this terminal, leave this"
|
||||||
echo "default URL shown. Otherwise, enter the server URL."
|
echo -n "blank. Otherwise, enter the server URL :"
|
||||||
echo -n "[http://localhost] :"
|
|
||||||
read server_url
|
read server_url
|
||||||
if [[ $server_url == "" ]]
|
if [[ $server_url == "" ]]
|
||||||
then
|
then
|
||||||
server_url="http://localhost"
|
conftype="Server/Terminal"
|
||||||
fi
|
touch /etc/drs.conf
|
||||||
echo "DRS_SERVER=\"$server_url\"" > /etc/drs.conf
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
echo "Terminal configuration is now complete. "
|
|
||||||
echo ""
|
|
||||||
echo ""
|
|
||||||
echo "If this Raspberry Pi will also be used as the OpenDRS server, you will need"
|
|
||||||
echo "to run the server-setup.sh script in this same directory."
|
|
||||||
echo "Would you like to do that now? enter Y if so, or press enter to leave this"
|
|
||||||
echo -n "as a terminal only and reboot :"
|
|
||||||
read serverchoice
|
|
||||||
if [[ $serverchoice == "Y" || $serverchoice == "y" ]]
|
|
||||||
then
|
|
||||||
./server-setup.sh
|
./server-setup.sh
|
||||||
|
else
|
||||||
|
conftype="Terminal"
|
||||||
|
echo "DRS_SERVER=\"$server_url\"" > /etc/drs.conf
|
||||||
fi
|
fi
|
||||||
echo "It is highly recommended that after rebooting, you press ctrl-alt-F2,"
|
echo ""
|
||||||
echo "log in as pi, then create new users for yourself and any other"
|
echo ""
|
||||||
echo "administrators using the cloneuser command (cloneuser pi newlogin)."
|
echo "$conftype configuration is now complete. "
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo "It is highly recommended that after rebooting, you run ssh pi@$HOSTNAME"
|
||||||
|
echo "from another computer on the network, then create new users for"
|
||||||
|
echo "yourself and any other administrators using the cloneuser command"
|
||||||
|
echo "(cloneuser pi <new username>)."
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
echo "Setup complete."
|
echo "Setup complete."
|
||||||
|
|||||||
@@ -2,17 +2,27 @@
|
|||||||
SRC=$1
|
SRC=$1
|
||||||
DEST=$2
|
DEST=$2
|
||||||
|
|
||||||
|
if [ $# -ne 2 ]; then
|
||||||
|
echo "Usage: cloneuser source_user destination_user"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! grep -q $SRC /etc/passwd ;then echo "Source user doesn't exist!"; exit 1; fi
|
||||||
|
if grep -q $DEST /etc/passwd ;then echo "Destination user already exists!"; exit 1; fi
|
||||||
|
|
||||||
SRC_GROUPS=`id -Gn ${SRC}`
|
SRC_GROUPS=`id -Gn ${SRC}`
|
||||||
SRC_SHELL=$(awk -F : -v name=${SRC} '(name == $1) { print $7 }' /etc/passwd)
|
SRC_SHELL=$(awk -F : -v name=${SRC} '(name == $1) { print $7 }' /etc/passwd)
|
||||||
|
RAND_PW=`date +%s | sha256sum | base64 | head -c 32 ; echo`
|
||||||
|
|
||||||
echo "Creating user $DEST"
|
echo "Creating user $DEST with a random password"
|
||||||
useradd --shell ${SRC_SHELL} --create-home ${DEST}
|
useradd --shell ${SRC_SHELL} --password ${RAND_PW} --create-home ${DEST}
|
||||||
for grp in ${SRC_GROUPS};do
|
for grp in ${SRC_GROUPS};do
|
||||||
if [ "$grp" != "$SRC" ]; then
|
if [ "$grp" != "$SRC" ]; then
|
||||||
echo "Adding user $DEST to group $grp."
|
echo "Adding user $DEST to group $grp."
|
||||||
usermod -a -G $grp ${DEST}
|
usermod -a -G $grp ${DEST}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
passwd ${DEST}
|
echo "Finished. Please set an actual password for $DEST if you want them to be able to log in."
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,18 +7,16 @@ openbox-session &
|
|||||||
xset s off
|
xset s off
|
||||||
xset +dpms
|
xset +dpms
|
||||||
xset dpms 0 600 1800
|
xset dpms 0 600 1800
|
||||||
|
|
||||||
#xset dpms force off
|
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
killall chromium-browser
|
killall chromium-browser
|
||||||
rm -rf ~/.{config,cache}/chromium/
|
rm -rf ~/.{config,cache}/chromium/
|
||||||
|
|
||||||
# start browser in your web site: here, just plain old localhost
|
# start browser to DRS Server
|
||||||
# -test-type will ignore any warnings and
|
# --test-type will ignore any warnings and
|
||||||
# --ignore-certificate-errors will allow you to kiosk any https-page without displaying certificate errors
|
# --ignore-certificate-errors will allow you to kiosk any https-page without displaying certificate errors
|
||||||
chromium-browser -test-type --ignore-certificate-errors --kiosk --no-first-run --incognito $DRS_SERVER &
|
chromium-browser --test-type --ignore-certificate-errors --kiosk --no-first-run --check-for-update-interval=1 --simulate-upgrade --incognito $DRS_SERVER &
|
||||||
|
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
@@ -27,8 +25,8 @@ do
|
|||||||
pgrep chromium-browse
|
pgrep chromium-browse
|
||||||
if [ "$?" -eq "1" ]
|
if [ "$?" -eq "1" ]
|
||||||
then
|
then
|
||||||
# here you could execute something that is supposed to happen after the browser was accidentally quit
|
# relaunch browser if it terminates
|
||||||
chromium-browser -test-type --ignore-certificate-errors --kiosk --no-first-run --incognito $DRS_SERVER &
|
chromium-browser --test-type --ignore-certificate-errors --kiosk --no-first-run --check-for-update-interval=1 --simulate-upgrade --incognito $DRS_SERVER &
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Raspberry Pi setup
|
Raspberry Pi setup
|
||||||
|
|
||||||
1. Create Raspbian Lite SD card from the most recent stable release.
|
1. Create Raspberry Pi OS Lite SD card from the most recent stable release.
|
||||||
|
|
||||||
2. Insert SD card in Raspberry Pi and boot.
|
2. Insert SD card in Raspberry Pi and boot.
|
||||||
|
|
||||||
@@ -8,24 +8,24 @@ Raspberry Pi setup
|
|||||||
|
|
||||||
4. sudo raspi-config and:
|
4. sudo raspi-config and:
|
||||||
|
|
||||||
a. Use option 1 to set a strong password for the default user (pi).
|
a. Set a strong password for the default user (pi).
|
||||||
|
|
||||||
b. Use option 2 Network Options to:
|
b. Set the desired hostname.
|
||||||
1. Set the desired hostname.
|
|
||||||
2. Set WiFi SSID and passphrase if using WiFi for networking.
|
|
||||||
|
|
||||||
c. Use option 4 Localisation Options to:
|
c. Set Wireless LAN SSID and passphrase if using WiFi for networking.
|
||||||
1. Set locale.
|
|
||||||
|
c. Use Localisation Options to:
|
||||||
|
1. Set locale to en_US.UTF-8 UTF-8.
|
||||||
2. Set timezone.
|
2. Set timezone.
|
||||||
3. Set keyboard layout (IMPORTANT! Raspbian is made in England, so
|
3. Set keyboard layout (IMPORTANT! Raspberry Pi OS is made in
|
||||||
unless that's the kind of keyboard you have, the default layout
|
England, so unless that's the kind of keyboard you have, the
|
||||||
will make your symbols come out wrong!).
|
default layout will make your symbols come out wrong!).
|
||||||
4. Set WiFi country.
|
4. Set WLAN country.
|
||||||
|
|
||||||
d. Use option 5 Interfacing Options to enable SSH server.
|
d. Use Interfacing Options to enable SSH server.
|
||||||
|
|
||||||
e. If you have black borders on the sides of the screen, use option 7
|
e. If you have black borders on the sides of the screen, use Display
|
||||||
Advanced Options to select No for Overscan compensation.
|
Underscan option to change Overscan compensation.
|
||||||
|
|
||||||
f. When you've finished, tab down to highlight Finish and hit enter.
|
f. When you've finished, tab down to highlight Finish and hit enter.
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
boilerplate.php
|
boilerplate.php
|
||||||
OpenDRS Online Discrepancy Reporting System
|
OpenDRS Online Discrepancy Reporting System
|
||||||
Copyright (C) 2018 Rod Wright
|
Copyright (C) 2020 Rod Wright
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0
|
SPDX-License-Identifier: GPL-2.0
|
||||||
*/
|
*/
|
||||||
@@ -48,7 +48,7 @@ if ($print=="Printer Friendly") {
|
|||||||
$mbgcolor=MENUBG_COLOR;
|
$mbgcolor=MENUBG_COLOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
$role=dblookup($mts_db,"users","id","role",$userid);
|
$role=dblookup($drs_db,"users","id","role",$userid);
|
||||||
|
|
||||||
framework("begin","$appname","Boilerplate Page",$print);
|
framework("begin","$appname","Boilerplate Page",$print);
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
db.php
|
db.php
|
||||||
OpenDRS Online Discrepancy Reporting System
|
OpenDRS Online Discrepancy Reporting System
|
||||||
Copyright (C) 2018 Rod Wright
|
Copyright (C) 2020 Rod Wright
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0
|
SPDX-License-Identifier: GPL-2.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
OpenDRS - Online Discrepancy Reporting System
|
OpenDRS - Online Discrepancy Reporting System
|
||||||
Copyright (C) 2018 Rod Wright
|
Copyright (C) 2020 Rod Wright
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -27,17 +27,46 @@ Changelog
|
|||||||
back button in terminal mode.
|
back button in terminal mode.
|
||||||
- Added configurable help text for period effective selection.
|
- Added configurable help text for period effective selection.
|
||||||
- Changed Sim period effective from selection to yes/no radio buttons.
|
- Changed Sim period effective from selection to yes/no radio buttons.
|
||||||
- Writeup groups page shows collapsed list of groups. Click the expand icon
|
- Writeup groups page shows collapsed list of groups. Click the expand
|
||||||
to expand each group.
|
icon to expand each group.
|
||||||
- Fixed bug where entries made on stale create page had inaccurate date/time.
|
- Fixed bug where entries made on stale create page had inaccurate
|
||||||
- For logged in users, added the ability to select writeups directly on the
|
date/time.
|
||||||
View All Writeups page and assign/create a group.
|
- For logged in users, added the ability to select writeups directly on
|
||||||
- On the Create New Writeup page, removed the default selections for Device,
|
the View All Writeups page and assign/create a group.
|
||||||
Subsystem, and Period dropdowns, forcing user to make a selection.
|
- On the Create New Writeup page, removed the default selections for
|
||||||
|
Device, Subsystem, and Period dropdowns, forcing user to make a
|
||||||
|
selection.
|
||||||
- Added a Today button to the View All Writeups page
|
- Added a Today button to the View All Writeups page
|
||||||
- Changed the Period dropdowns on the Create, Search, and Group pages to show
|
- Changed the Period dropdowns on the Create, Search, and Group pages to
|
||||||
the times instead of the period numbers. Period numbers are still shown
|
show the times instead of the period numbers. Period numbers are
|
||||||
in the results tables with mouse hover showing times.
|
still shown in the results tables with mouse hover showing times.
|
||||||
- Moved all installation/upgrade functions to the install.sh script.
|
- Moved all installation/upgrade functions to the install.sh script.
|
||||||
|
|
||||||
|
1.1.1 - 2020-04-09
|
||||||
|
- Fixed opendrs-update.sql to rename the trainers table.
|
||||||
|
- Fixed bug where the About page didn't show the version number.
|
||||||
|
- Fixed some grammar on the About page.
|
||||||
|
- Fixed hardcoded help text in groups.php to use constant from config.
|
||||||
|
- Added ID to searchable parameters in search.php.
|
||||||
|
- Added sort parameters to search results.
|
||||||
|
- Added a link for Admins to access the local Webmin to manage a terminal.
|
||||||
|
- For Raspberry Pi:
|
||||||
|
- In terminal setup, provided missing .profile and
|
||||||
|
.config/openbox/rc.xml files.
|
||||||
|
- In server setup, install mariadb-server since
|
||||||
|
mysql-server is obsolete.
|
||||||
|
- Changed startdrs.sh to re-enable ctrl keys for copy/paste, etc. Also
|
||||||
|
added chromium flags to prevent update popup.
|
||||||
|
- Added openbox keybindings to customer user's rc.xml to trap dangerous
|
||||||
|
chromium hotkey combinations and enable ctrl-alt-del reboot.
|
||||||
|
- Changed systemd ctrl-alt-del.target symlink to point to
|
||||||
|
reboot.target.
|
||||||
|
|
||||||
|
1.1.2 - 2021-04-28
|
||||||
|
- Added ability to export search results as a CSV file.
|
||||||
|
- Fixed bug in server-setup.sh that resulted in an incorrect install
|
||||||
|
location if the installation name was left at the default.
|
||||||
|
- Fixed bug in server-setup.sh that resulted in failure to set the
|
||||||
|
ownership of the installed server directory tree if the http
|
||||||
|
user and group names were left at the default.
|
||||||
|
- Updated and tested to support Raspberry Pi 4B hardware.
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ follow the prompts.
|
|||||||
4. Log in
|
4. Log in
|
||||||
Click on the Log In menu option on the main page. If this is a fresh
|
Click on the Log In menu option on the main page. If this is a fresh
|
||||||
installation The initial user is drsadmin and the initial password
|
installation The initial user is drsadmin and the initial password
|
||||||
is OpenDRS-1. It is highly recommended that you changethis password
|
is OpenDRS-1. It is highly recommended that you change this password
|
||||||
to a strong one by going to the Manage Database page under the
|
to a strong one by going to the Manage Database page under the
|
||||||
Admin Functions menu. If this an upgrade, your current usernames and
|
Admin Functions menu. If this an upgrade, your current usernames and
|
||||||
passwords are unchanged.
|
passwords are unchanged.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
about.php
|
about.php
|
||||||
OpenDRS Online Discrepancy Reporting System
|
OpenDRS Online Discrepancy Reporting System
|
||||||
Copyright (C) 2018 Rod Wright
|
Copyright (C) 2020 Rod Wright
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0
|
SPDX-License-Identifier: GPL-2.0
|
||||||
*/
|
*/
|
||||||
@@ -39,6 +39,7 @@ if ($print) {
|
|||||||
|
|
||||||
// assign variables from constants
|
// assign variables from constants
|
||||||
$appname=APP_NAME;
|
$appname=APP_NAME;
|
||||||
|
$drs_version=DRS_VERSION;
|
||||||
|
|
||||||
if ($print=="Printer Friendly") {
|
if ($print=="Printer Friendly") {
|
||||||
$sbcolor=P_SIDEBAR_COLOR;
|
$sbcolor=P_SIDEBAR_COLOR;
|
||||||
@@ -72,7 +73,7 @@ echo "<br>";
|
|||||||
|
|
||||||
echo "
|
echo "
|
||||||
<h3 align=\"center\">
|
<h3 align=\"center\">
|
||||||
OpenDRS $version Discrepancy Reporting System
|
OpenDRS $drs_version Discrepancy Reporting System
|
||||||
</h3><br>
|
</h3><br>
|
||||||
<p>This program is licensed under the terms of the <a href=\"gpl.php\">GNU General Public License</a>. Click on the link
|
<p>This program is licensed under the terms of the <a href=\"gpl.php\">GNU General Public License</a>. Click on the link
|
||||||
or see the LICENSE file in the distribution to read it. OpenDRS is Copyright (C) 2018 by Rod Wright.
|
or see the LICENSE file in the distribution to read it. OpenDRS is Copyright (C) 2018 by Rod Wright.
|
||||||
@@ -119,7 +120,7 @@ server.</td>
|
|||||||
<tr>
|
<tr>
|
||||||
<td><a href=\"http://p.yusukekamiyamane.com\" target=\"_blank\"><img src=\"images/Kamiyamane.png\"
|
<td><a href=\"http://p.yusukekamiyamane.com\" target=\"_blank\"><img src=\"images/Kamiyamane.png\"
|
||||||
border=0></a></td><td><b>Fugue<br>Icons</b></td><td>The icons used in OpenDRS are from the Fugue Icon set created by Yusuke Kamiyamane. The entire set is available at
|
border=0></a></td><td><b>Fugue<br>Icons</b></td><td>The icons used in OpenDRS are from the Fugue Icon set created by Yusuke Kamiyamane. The entire set is available at
|
||||||
<a href=\"http://p.yusukekamiyamane.com/\" target=\"_blank\">p.yusukekamiyamane.com</a>, and are licensed under a
|
<a href=\"http://p.yusukekamiyamane.com/\" target=\"_blank\">p.yusukekamiyamane.com</a>, and is licensed under the
|
||||||
<a href=\"http://creativecommons.org/licenses/by/3.0/legalcode\" target=\"_blank\">Creative Commons Attribution 3.0 License</a>.</td>
|
<a href=\"http://creativecommons.org/licenses/by/3.0/legalcode\" target=\"_blank\">Creative Commons Attribution 3.0 License</a>.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
common.php
|
common.php
|
||||||
OpenDRS Online Discrepancy Reporting System
|
OpenDRS Online Discrepancy Reporting System
|
||||||
Copyright (C) 2018 Rod Wright
|
Copyright (C) 2020 Rod Wright
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0
|
SPDX-License-Identifier: GPL-2.0
|
||||||
*/
|
*/
|
||||||
@@ -357,7 +357,7 @@ function sidemenu($printable=true) {
|
|||||||
echo "
|
echo "
|
||||||
<br>
|
<br>
|
||||||
<table style=\"table-layout:fixed;width:210px;\" bgcolor=\"#$mbgcolor\" border=\"1\" width=\"100%\">
|
<table style=\"table-layout:fixed;width:210px;\" bgcolor=\"#$mbgcolor\" border=\"1\" width=\"100%\">
|
||||||
<tr><td align=\"center\"><a href=\"writeups.php\" title=\"View open writeups\"><font size=\"+1\"><b>View Open Writeups</b></font></a></td></tr>
|
<tr><td align=\"center\"><a href=\"writeups.php\" title=\"View open writeups\">View Open Writeups</a></td></tr>
|
||||||
<tr><td align=\"center\"><a href=\"writeups.php?view=1\" title=\"View all writeups for a date range\">View All Writeups</a></td></tr>
|
<tr><td align=\"center\"><a href=\"writeups.php?view=1\" title=\"View all writeups for a date range\">View All Writeups</a></td></tr>
|
||||||
<tr><td align=\"center\"><a href=\"groups.php\" title=\"View writeup groups\">Writeup Groups</a></td></tr>
|
<tr><td align=\"center\"><a href=\"groups.php\" title=\"View writeup groups\">Writeup Groups</a></td></tr>
|
||||||
<tr><td align=\"center\"><a href=\"search.php\">Search Writeups</a></td></tr>
|
<tr><td align=\"center\"><a href=\"search.php\">Search Writeups</a></td></tr>
|
||||||
@@ -374,6 +374,7 @@ function sidemenu($printable=true) {
|
|||||||
<tr><td align=\"center\"><b>Admin Functions</b></td></tr>
|
<tr><td align=\"center\"><b>Admin Functions</b></td></tr>
|
||||||
<tr><td align=\"center\"><a href=\"config.php\" title=\"Control global settings. Must be an administrator.\">Global Settings</a></td></tr>
|
<tr><td align=\"center\"><a href=\"config.php\" title=\"Control global settings. Must be an administrator.\">Global Settings</a></td></tr>
|
||||||
<tr><td align=\"center\"><a href=\"dbadmin.php\" title=\"Manage the database. Must be an administrator.\">Manage Database</a></td></tr>
|
<tr><td align=\"center\"><a href=\"dbadmin.php\" title=\"Manage the database. Must be an administrator.\">Manage Database</a></td></tr>
|
||||||
|
<tr><td align=\"center\"><a href=\"https://localhost:10000\" title=\"Webmin for managing a terminal. Webmin must be running on localhost.\">Manage Terminal</a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
";
|
";
|
||||||
@@ -806,5 +807,4 @@ function group_table($groupid,$role=false,$mode="view",$selection="none",$expand
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
config.php
|
config.php
|
||||||
OpenDRS Online Discrepancy Reporting System
|
OpenDRS Online Discrepancy Reporting System
|
||||||
Copyright (C) 2018 Rod Wright
|
Copyright (C) 2020 Rod Wright
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0
|
SPDX-License-Identifier: GPL-2.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
create.php
|
create.php
|
||||||
OpenDRS Online Discrepancy Reporting System
|
OpenDRS Online Discrepancy Reporting System
|
||||||
Copyright (C) 2018 Rod Wright
|
Copyright (C) 2020 Rod Wright
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0
|
SPDX-License-Identifier: GPL-2.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
dbadmin.php
|
dbadmin.php
|
||||||
OpenDRS Online Discrepancy Reporting System
|
OpenDRS Online Discrepancy Reporting System
|
||||||
Copyright (C) 2018 Rod Wright
|
Copyright (C) 2020 Rod Wright
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0
|
SPDX-License-Identifier: GPL-2.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
gpl.php
|
gpl.php
|
||||||
OpenMTS Online Maintenance Tracking System
|
OpenMTS Online Maintenance Tracking System
|
||||||
Copyright (C) 2018 Rod Wright
|
Copyright (C) 2020 Rod Wright
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0
|
SPDX-License-Identifier: GPL-2.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
groups.php
|
groups.php
|
||||||
OpenDRS Online Discrepancy Reporting System
|
OpenDRS Online Discrepancy Reporting System
|
||||||
Copyright (C) 2018 Rod Wright
|
Copyright (C) 2020 Rod Wright
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0
|
SPDX-License-Identifier: GPL-2.0
|
||||||
*/
|
*/
|
||||||
@@ -490,8 +490,7 @@ if ($action=="add") {
|
|||||||
";
|
";
|
||||||
// Period effective cell ************
|
// Period effective cell ************
|
||||||
echo "
|
echo "
|
||||||
Sim period effective? <img src=\"icons/question.png\" title=\"If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective.
|
Sim period effective? <img src=\"icons/question.png\" title=\"" . PERIOD_EFF_HELP_TXT . "\"><br>
|
||||||
Otherwise, answer Effective. \"><br>
|
|
||||||
";
|
";
|
||||||
if ($search) {
|
if ($search) {
|
||||||
$effstate=$nefstate="";
|
$effstate=$nefstate="";
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 258 B |
|
Before Width: | Height: | Size: 584 B |
|
Before Width: | Height: | Size: 586 B |
|
Before Width: | Height: | Size: 458 B |
|
Before Width: | Height: | Size: 551 B |
|
Before Width: | Height: | Size: 564 B |
|
Before Width: | Height: | Size: 470 B |
|
Before Width: | Height: | Size: 696 B |
|
Before Width: | Height: | Size: 811 B |
|
Before Width: | Height: | Size: 479 B |
|
Before Width: | Height: | Size: 811 B |
|
Before Width: | Height: | Size: 548 B |
|
Before Width: | Height: | Size: 757 B |
|
Before Width: | Height: | Size: 583 B |
|
Before Width: | Height: | Size: 521 B |
|
Before Width: | Height: | Size: 761 B |
|
Before Width: | Height: | Size: 562 B |
|
Before Width: | Height: | Size: 592 B |
|
Before Width: | Height: | Size: 481 B |
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
login.php
|
login.php
|
||||||
OpenDRS Online Discrepancy Reporting System
|
OpenDRS Online Discrepancy Reporting System
|
||||||
Copyright (C) 2018 Rod Wright
|
Copyright (C) 2020 Rod Wright
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0
|
SPDX-License-Identifier: GPL-2.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
profile.php
|
profile.php
|
||||||
OpenDRS Online Discrepancy Reporting System
|
OpenDRS Online Discrepancy Reporting System
|
||||||
Copyright (C) 2018 Rod Wright
|
Copyright (C) 2020 Rod Wright
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0
|
SPDX-License-Identifier: GPL-2.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
1124
distfiles/search.php
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
settings.php
|
settings.php
|
||||||
OpenDRS Online Discrepancy Reporting System
|
OpenDRS Online Discrepancy Reporting System
|
||||||
Copyright (C) 2018 Rod Wright
|
Copyright (C) 2020 Rod Wright
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0
|
SPDX-License-Identifier: GPL-2.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
writeupdetail.php
|
writeupdetail.php
|
||||||
OpenDRS Online Discrepancy Reporting System
|
OpenDRS Online Discrepancy Reporting System
|
||||||
Copyright (C) 2018 Rod Wright
|
Copyright (C) 2020 Rod Wright
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0
|
SPDX-License-Identifier: GPL-2.0
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
writeups.php
|
writeups.php
|
||||||
OpenDRS Online Discrepancy Reporting System
|
OpenDRS Online Discrepancy Reporting System
|
||||||
Copyright (C) 2018 Rod Wright
|
Copyright (C) 2020 Rod Wright
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0
|
SPDX-License-Identifier: GPL-2.0
|
||||||
*/
|
*/
|
||||||
@@ -58,7 +58,6 @@ function opentable($start_date,$end_date,$print,$drs_db,$viewtype="summary") {
|
|||||||
";
|
";
|
||||||
if ($print) {
|
if ($print) {
|
||||||
echo "
|
echo "
|
||||||
<form method=post action=\"writeups.php\">
|
|
||||||
Open writeups between $start_date and $end_date
|
Open writeups between $start_date and $end_date
|
||||||
";
|
";
|
||||||
} else {
|
} else {
|
||||||
@@ -175,20 +174,27 @@ function viewtable($start_date,$end_date,$print,$drs_db,$viewtype="summary",$rol
|
|||||||
echo "
|
echo "
|
||||||
<form method=post action=\"writeups.php\">
|
<form method=post action=\"writeups.php\">
|
||||||
<input type=\"hidden\" name=\"view\" value=\"1\">
|
<input type=\"hidden\" name=\"view\" value=\"1\">
|
||||||
Writeups between
|
|
||||||
<input type=\"text\" name=\"start_date\" size=\"10\" value=\"$start_date\" id=\"startdatepicker\" title=\"Format: YYYY-MM-DD\"> and
|
|
||||||
<input type=\"text\" name=\"end_date\" size=\"10\" value=\"$end_date\" id=\"enddatepicker\" title=\"Format: YYYY-MM-DD\">
|
|
||||||
";
|
";
|
||||||
if(!$print) {
|
if(!$print) {
|
||||||
echo "
|
echo "
|
||||||
<input type=\"submit\" name=\"update\" value=\"Update\">
|
|
||||||
<input type=\"submit\" name=\"showtoday\" value=\"Today\">
|
<input type=\"submit\" name=\"showtoday\" value=\"Today\">
|
||||||
<input type=\"submit\" name=\"showyesterday\" value=\"Yesterday\">
|
<input type=\"submit\" name=\"showyesterday\" value=\"Yesterday\">
|
||||||
<input type=\"submit\" name=\"show7day\" value=\"Last 7 Days\">
|
<input type=\"submit\" name=\"show7day\" value=\"Last 7 Days\">
|
||||||
<input type=\"submit\" name=\"show30day\" value=\"Last 30 Days\"><br><br>
|
<input type=\"submit\" name=\"show30day\" value=\"Last 30 Days\">
|
||||||
|
";
|
||||||
|
}
|
||||||
|
echo "
|
||||||
|
Writeups between
|
||||||
|
<input type=\"text\" name=\"start_date\" size=\"10\" value=\"$start_date\" id=\"startdatepicker\" title=\"Format: YYYY-MM-DD\"> and
|
||||||
|
<input type=\"text\" name=\"end_date\" size=\"10\" value=\"$end_date\" id=\"enddatepicker\" title=\"Format: YYYY-MM-DD\"><br><br>
|
||||||
|
";
|
||||||
|
if(!$print) {
|
||||||
|
echo "
|
||||||
<input type=\"radio\" $summarystat name=\"viewtype\" value=\"summary\" id=\"summaryview\" ><label for=\"summaryview\" title=\"Show one writeup per line with minimal detail.\">Results in summary view</label>
|
<input type=\"radio\" $summarystat name=\"viewtype\" value=\"summary\" id=\"summaryview\" ><label for=\"summaryview\" title=\"Show one writeup per line with minimal detail.\">Results in summary view</label>
|
||||||
<input type=\"radio\" $detailstat name=\"viewtype\" value=\"detail\" id=\"detailview\"><label for=\"detailview\" title=\"Show each writeup's full details.\">Results in detail view</label>
|
<input type=\"radio\" $detailstat name=\"viewtype\" value=\"detail\" id=\"detailview\"><label for=\"detailview\" title=\"Show each writeup's full details.\">Results in detail view</label>
|
||||||
<br><br>";
|
<input type=\"submit\" name=\"update\" value=\"Update\">
|
||||||
|
<br><br>
|
||||||
|
";
|
||||||
}
|
}
|
||||||
$writeup=mysqli_query($drs_db,"select * from writeups where report_date between \"$start_date\" and \"$end_date\" order by report_date desc,period desc,report_time desc");
|
$writeup=mysqli_query($drs_db,"select * from writeups where report_date between \"$start_date\" and \"$end_date\" order by report_date desc,period desc,report_time desc");
|
||||||
if (mysqli_num_rows($writeup)) {
|
if (mysqli_num_rows($writeup)) {
|
||||||
@@ -306,7 +312,7 @@ function viewtable($start_date,$end_date,$print,$drs_db,$viewtype="summary",$rol
|
|||||||
if ($role) {
|
if ($role) {
|
||||||
echo "
|
echo "
|
||||||
<br><br>
|
<br><br>
|
||||||
<button name=\"addtogroup\" value=\"addtogroup\" type=\"submit\">Add selected to group:</button> <select name=\"togroup\" id=\"sel-togroup\">
|
Add selected to group: <select name=\"togroup\" id=\"sel-togroup\">
|
||||||
<option value=\"newgroup\">New group</option>
|
<option value=\"newgroup\">New group</option>
|
||||||
";
|
";
|
||||||
$tgrow=mysqli_query($drs_db,"select id,name from groups order by id asc");
|
$tgrow=mysqli_query($drs_db,"select id,name from groups order by id asc");
|
||||||
@@ -315,6 +321,7 @@ function viewtable($start_date,$end_date,$print,$drs_db,$viewtype="summary",$rol
|
|||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
</select>
|
</select>
|
||||||
|
<button name=\"addtogroup\" value=\"addtogroup\" type=\"submit\">Submit</button>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
74
install.sh
@@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
# install.sh
|
# install.sh
|
||||||
# OpenDRS Online Discrepancy Reporting System
|
# OpenDRS Online Discrepancy Reporting System
|
||||||
# Copyright (C) 2018 Rod Wright
|
# Copyright (C) 2021 Rod Wright
|
||||||
|
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
|
||||||
DRS_VERSION="1.1.0"
|
DRS_VERSION="1.1.2"
|
||||||
DOC_ROOT="/var/www"
|
DOC_ROOT="/var/www"
|
||||||
INSTALL_LOC="opendrs"
|
INSTALL_LOC="opendrs"
|
||||||
APACHE_USER="www-data"
|
APACHE_USER="www-data"
|
||||||
@@ -42,15 +42,6 @@ echo ""
|
|||||||
echo -n "Enter name of OpenDRS installation directory [$INSTALL_LOC] :"
|
echo -n "Enter name of OpenDRS installation directory [$INSTALL_LOC] :"
|
||||||
read install_loc_in
|
read install_loc_in
|
||||||
echo ""
|
echo ""
|
||||||
echo "In order to set the ownership correctly, we need to know the user and"
|
|
||||||
echo "group that the webserver expects its files to be owned by. This is"
|
|
||||||
echo "usually not the root account. Refer to the ownership of other files in"
|
|
||||||
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
|
|
||||||
echo ""
|
|
||||||
if [ "$doc_root_in" = "" ]
|
if [ "$doc_root_in" = "" ]
|
||||||
then
|
then
|
||||||
doc_root_in=$DOC_ROOT
|
doc_root_in=$DOC_ROOT
|
||||||
@@ -59,10 +50,6 @@ if [ "$install_loc_in" = "" ]
|
|||||||
then
|
then
|
||||||
install_loc_in=$INSTALL_LOC
|
install_loc_in=$INSTALL_LOC
|
||||||
fi
|
fi
|
||||||
if [ "$httpd_user_group" = "" ]
|
|
||||||
then
|
|
||||||
httpd_user_group="$APACHE_USER:$APACHE_GROUP"
|
|
||||||
fi
|
|
||||||
install_path="$doc_root_in/$install_loc_in"
|
install_path="$doc_root_in/$install_loc_in"
|
||||||
if [ -d "$install_path" ]
|
if [ -d "$install_path" ]
|
||||||
then
|
then
|
||||||
@@ -90,22 +77,36 @@ then
|
|||||||
curr_dbname=`grep dbname $install_path/db.php | head -1 | cut -d "\"" -f2`
|
curr_dbname=`grep dbname $install_path/db.php | head -1 | cut -d "\"" -f2`
|
||||||
curr_username=`grep username $install_path/db.php | head -1 | cut -d "\"" -f2`
|
curr_username=`grep username $install_path/db.php | head -1 | cut -d "\"" -f2`
|
||||||
curr_dbpass=`grep dbpass $install_path/db.php | head -1 | cut -d "\"" -f2`
|
curr_dbpass=`grep dbpass $install_path/db.php | head -1 | cut -d "\"" -f2`
|
||||||
mysqldump -u"$curr_username" -p"$curr_dbpass" $curr_dbname > $curr_dbname-`date +%Y-%m-%d_%H:%M:%S`-backup.sql
|
export MYSQL_PWD="$curr_dbpass"
|
||||||
|
mysqldump -u"$curr_username" $curr_dbname > $curr_dbname-`date +%Y-%m-%d_%H:%M:%S`-backup.sql
|
||||||
# back up existing installation
|
# back up existing installation
|
||||||
echo "Backing up current installation to the package directory."
|
echo "Backing up current installation to the package directory."
|
||||||
cp -R $install_path $install_loc_in-`date +%Y-%m-%d_%H:%M:%S`-backup
|
cp -R $install_path $install_loc_in-`date +%Y-%m-%d_%H:%M:%S`-backup
|
||||||
# delete all existing installation files except db.php
|
# delete all existing installation files except db.php
|
||||||
find $install_path/ -mindepth 1 -not -name 'db.php' -delete
|
find $install_path/ -mindepth 1 -not -name 'db.php' -delete
|
||||||
# apply database updates
|
# apply database updates
|
||||||
mysql -u"$curr_username" -p"$curr_dbpass" $curr_dbname < opendrs-update.sql
|
mysql -u"$curr_username" $curr_dbname < opendrs-update.sql >/dev/null 2>&1
|
||||||
# apply updates to existing db.php
|
# apply updates to existing db.php
|
||||||
./opendrs-update.sh $install_path
|
./opendrs-update.sh $install_path
|
||||||
# copy distribution to install location
|
# copy distribution to install location
|
||||||
echo "Installing distribution . . ."
|
echo "Installing distribution . . ."
|
||||||
cp -R distfiles/* $install_path
|
cp -R distfiles/* $install_path
|
||||||
# set ownership
|
# set ownership
|
||||||
|
echo "In order to set the ownership correctly, we need to know the user and"
|
||||||
|
echo "group that the webserver expects its files to be owned by. This is"
|
||||||
|
echo "usually not the root account. Refer to the ownership of other files in"
|
||||||
|
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
|
||||||
|
if [ "$httpd_user_group" = "" ]
|
||||||
|
then
|
||||||
|
httpd_user_group="$APACHE_USER:$APACHE_GROUP"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
echo "Setting file ownership . . ."
|
echo "Setting file ownership . . ."
|
||||||
chown -R $httpd_user_group $install_path
|
chown -R $httpd_user_group $install_path
|
||||||
else
|
else
|
||||||
echo "Cancelling installation"
|
echo "Cancelling installation"
|
||||||
exit
|
exit
|
||||||
@@ -138,7 +139,8 @@ else
|
|||||||
echo ""
|
echo ""
|
||||||
echo -n "MySQL admin password: "
|
echo -n "MySQL admin password: "
|
||||||
read -s mysql_adm_pass
|
read -s mysql_adm_pass
|
||||||
mysql -u"$mysql_adm_user" -p"$mysql_adm_pass" -e "create database $admintestdb;drop database $admintestdb" 2>/dev/null
|
export MYSQL_PWD="$mysql_adm_pass"
|
||||||
|
mysql -u"$mysql_adm_user" -e "create database $admintestdb;drop database $admintestdb"
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
bad_mysql_adm=0
|
bad_mysql_adm=0
|
||||||
@@ -171,8 +173,13 @@ else
|
|||||||
echo "distinctive name."
|
echo "distinctive name."
|
||||||
echo -n "database name [opendrs]: "
|
echo -n "database name [opendrs]: "
|
||||||
read new_db_name
|
read new_db_name
|
||||||
|
if [ "$new_db_name" = "" ]
|
||||||
|
then
|
||||||
|
new_db_name=opendrs
|
||||||
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
mysql -u"$mysql_adm_user" -p"$mysql_adm_pass" -e "create database $new_db_name" 2>/dev/null
|
export MYSQL_PWD="$mysql_adm_pass"
|
||||||
|
mysql -u"$mysql_adm_user" -e "create database $new_db_name"
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
db_create_fail=0
|
db_create_fail=0
|
||||||
@@ -191,15 +198,17 @@ else
|
|||||||
# Create user and give rights to database
|
# Create user and give rights to database
|
||||||
drs_user="$new_db_name`date +%Y%m%d%H%M%S`"
|
drs_user="$new_db_name`date +%Y%m%d%H%M%S`"
|
||||||
drs_pass=`uuidgen`
|
drs_pass=`uuidgen`
|
||||||
mysql -u"$mysql_adm_user" -p"$mysql_adm_pass" -e "create user if not exists '$drs_user'@'localhost' identified by '$drs_pass'" 2>/dev/null
|
export MYSQL_PWD="$mysql_adm_pass"
|
||||||
mysql -u"$mysql_adm_user" -p"$mysql_adm_pass" -e "grant all on $new_db_name.* to '$drs_user'@'localhost'"
|
mysql -u"$mysql_adm_user" -e "create user if not exists '$drs_user'@'localhost' identified by '$drs_pass'"
|
||||||
mysql -u"$mysql_adm_user" -p"$mysql_adm_pass" -e "flush privileges"
|
mysql -u"$mysql_adm_user" -e "grant all on $new_db_name.* to '$drs_user'@'localhost'"
|
||||||
|
mysql -u"$mysql_adm_user" -e "flush privileges"
|
||||||
|
|
||||||
# Populate initial database
|
# Populate initial database
|
||||||
mysql -u"$mysql_adm_user" -p"$mysql_adm_pass" $new_db_name < opendrs-initial.sql 2>/dev/null
|
mysql -u"$mysql_adm_user" $new_db_name < opendrs-initial.sql
|
||||||
|
|
||||||
# Set the installation name
|
# Set the installation name
|
||||||
mysql -u"$drs_user" -p"$drs_pass" $new_db_name -e "update config set value=\"$new_inst_name\",defaultvalue=\"$new_inst_name\" where name=\"app_name\""
|
export MYSQL_PWD="$drs_pass"
|
||||||
|
mysql -u"$drs_user" $new_db_name -e "update config set value=\"$new_inst_name\",defaultvalue=\"$new_inst_name\" where name=\"app_name\""
|
||||||
|
|
||||||
# Create install path
|
# Create install path
|
||||||
echo "Creating installation directory . . ."
|
echo "Creating installation directory . . ."
|
||||||
@@ -219,8 +228,21 @@ else
|
|||||||
cp -Rv distfiles/* $install_path
|
cp -Rv distfiles/* $install_path
|
||||||
|
|
||||||
# set ownership
|
# set ownership
|
||||||
|
echo "In order to set the ownership correctly, we need to know the user and"
|
||||||
|
echo "group that the webserver expects its files to be owned by. This is"
|
||||||
|
echo "usually not the root account. Refer to the ownership of other files in"
|
||||||
|
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
|
||||||
|
if [ "$httpd_user_group" = "" ]
|
||||||
|
then
|
||||||
|
httpd_user_group="$APACHE_USER:$APACHE_GROUP"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
echo "Setting file ownership . . ."
|
echo "Setting file ownership . . ."
|
||||||
chown -R $httpd_user_group $install_path
|
chown -R $httpd_user_group $install_path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ CREATE TABLE `config` (
|
|||||||
|
|
||||||
LOCK TABLES `config` WRITE;
|
LOCK TABLES `config` WRITE;
|
||||||
/*!40000 ALTER TABLE `config` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `config` DISABLE KEYS */;
|
||||||
INSERT INTO `config` VALUES (1,'drs_version','1.1.0','1.1.0'),(5,'app_name','OpenDRS - Discrepancy Reporting System','OpenDRS Discrepancy Reporting System'),(6,'banner','1','1'),(7,'background_color','0B3144','0B3144'),(8,'p_background_color','FFFFFF','FFFFFF'),(11,'menubg_color','000000','000000'),(12,'p_menubg_color','FFFFFF','FFFFFF'),(13,'text_color','FFFFFF','FFFFFF'),(14,'p_text_color','000000','000000'),(15,'link_color','79EFEA','79EFEA'),(16,'p_link_color','000000','000000'),(17,'vlink_color','79EFEA','79EFEA'),(18,'p_vlink_color','000000','000000'),(19,'heading_color','5AE2B3','5AE2B3'),(20,'p_heading_color','000000','000000'),(21,'footer_message','Please report bugs to Rod Wright (software@rodsplace.net)','Please report bugs to Rod Wright (software@rodsplace.net)'),(26,'unix_server_session_dir','/tmp/opendrs/opendrs/sessions','/tmp/opendrs/opendrs/sessions'),(27,'win_server_session_dir','c:\\Windows\\Temp\\opendrs\\opendrs\\sessions','c:\\Windows\\Temp\\opendrs\\opendrs\\sessions'),(28,'session_ttl_days','30','30'),(29,'period_eff_help_txt','If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.','If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.');
|
INSERT INTO `config` VALUES (1,'drs_version','1.1.2','1.1.2'),(5,'app_name','OpenDRS - Discrepancy Reporting System','OpenDRS Discrepancy Reporting System'),(6,'banner','1','1'),(7,'background_color','0B3144','0B3144'),(8,'p_background_color','FFFFFF','FFFFFF'),(11,'menubg_color','000000','000000'),(12,'p_menubg_color','FFFFFF','FFFFFF'),(13,'text_color','FFFFFF','FFFFFF'),(14,'p_text_color','000000','000000'),(15,'link_color','79EFEA','79EFEA'),(16,'p_link_color','000000','000000'),(17,'vlink_color','79EFEA','79EFEA'),(18,'p_vlink_color','000000','000000'),(19,'heading_color','5AE2B3','5AE2B3'),(20,'p_heading_color','000000','000000'),(21,'footer_message','Please report bugs to Rod Wright (software@rodsplace.net)','Please report bugs to Rod Wright (software@rodsplace.net)'),(26,'unix_server_session_dir','/tmp/opendrs/opendrs/sessions','/tmp/opendrs/opendrs/sessions'),(27,'win_server_session_dir','c:\\Windows\\Temp\\opendrs\\opendrs\\sessions','c:\\Windows\\Temp\\opendrs\\opendrs\\sessions'),(28,'session_ttl_days','30','30'),(29,'period_eff_help_txt','If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.','If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.');
|
||||||
/*!40000 ALTER TABLE `config` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `config` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,41 @@
|
|||||||
# opendrs-update.sql
|
-- opendrs-update.sql
|
||||||
|
|
||||||
# ---------- version 1.1.0 -------------
|
-- ---------- version 1.1.0 -------------
|
||||||
# Update version number
|
-- Update version number
|
||||||
update config set name="drs_version" where name="mts_version";
|
UPDATE config SET name="drs_version" WHERE name="mts_version";
|
||||||
update config set value="1.1.0",defaultvalue="1.1.0" where name="drs_version";
|
UPDATE config SET value="1.1.0",defaultvalue="1.1.0" WHERE name="drs_version";
|
||||||
|
|
||||||
# Add period_eff_help_txt to config table
|
-- Add period_eff_help_txt to config table
|
||||||
insert into config(name,value,defaultvalue)
|
INSERT INTO config(name,value,defaultvalue)
|
||||||
select * from
|
SELECT * FROM
|
||||||
(select 'period_eff_help_txt',
|
(SELECT 'period_eff_help_txt',
|
||||||
'If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.' as wval,
|
'If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.' AS wval,
|
||||||
'If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.' as dval
|
'If maintenance issues prevented the training objectives from being achieved and you will have to come back and redo the same training, answer Non-effective. Otherwise, answer Effective.' AS dval
|
||||||
)
|
)
|
||||||
as tmp
|
AS tmp
|
||||||
where not exists
|
WHERE NOT EXISTS
|
||||||
(
|
(
|
||||||
select name from config where name = 'period_eff_help_txt'
|
SELECT name FROM config WHERE name = 'period_eff_help_txt'
|
||||||
) limit 1
|
) LIMIT 1
|
||||||
;
|
;
|
||||||
# ---------------------------------------
|
-- --------------------------------------
|
||||||
|
|
||||||
|
-- ---------- version 1.1.1 -------------
|
||||||
|
-- Update version number
|
||||||
|
UPDATE config SET value="1.1.1",defaultvalue="1.1.1" WHERE name="drs_version";
|
||||||
|
|
||||||
|
-- Rename the trainers table to devices
|
||||||
|
RENAME TABLE trainers TO devices;
|
||||||
|
|
||||||
|
-- Update default app name
|
||||||
|
UPDATE config SET defaultvalue="OpenDRS Discrepancy Reporting System" WHERE name="app_name";
|
||||||
|
|
||||||
|
-- Update default session directories
|
||||||
|
UPDATE config SET defaultvalue="/tmp/opendrs/opendrs/sessions" WHERE name="unix_server_session_dir";
|
||||||
|
UPDATE config SET defaultvalue="c:\Windows\Temp\opendrs\opendrs\sessions" WHERE name="win_server_session_dir";
|
||||||
|
-- --------------------------------------
|
||||||
|
|
||||||
|
-- ---------- version 1.1.2 -------------
|
||||||
|
-- Update version number
|
||||||
|
UPDATE config SET value="1.1.2",defaultvalue="1.1.2" WHERE name="drs_version";
|
||||||
|
-- --------------------------------------
|
||||||
|
|||||||