Skip to content

Commit

Permalink
Merge pull request #19 from FherStk:open-project
Browse files Browse the repository at this point in the history
- New 'open-project-v12' script.
 - Removed unnecessary 'sudo' because any script should run as sudo
  • Loading branch information
FherStk authored Mar 7, 2023
2 parents b61cc50 + deef751 commit 73bda07
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 6 deletions.
34 changes: 34 additions & 0 deletions scripts/open-project-v12.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
SCRIPT_VERSION="1.0.0"
SCRIPT_NAME="Ubuntu Server 22.04 LTS (Open-Project v12)"
HOST_NAME="open-project"

SCRIPT_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
SCRIPT_FILE=$(basename $BASH_SOURCE)
source $SCRIPT_PATH/../utils/main.sh

startup
script-setup

echo ""
title "Downloading OpenProject's public key:"
wget -qO- https://dl.packager.io/srv/opf/openproject/key | sudo apt-key add -


echo ""
title "Adding the repository:"
wget -O /etc/apt/sources.list.d/openproject.list https://dl.packager.io/srv/opf/openproject/stable/12/installer/ubuntu/22.04.repo

apt update
apt-install "openproject"

echo ""
title "Copying the auto-setup configuration file:"
cp $SCRIPT_PATH/../utils/open-project-v12/installer.dat /etc/openproject/installer.dat

echo ""
title "Setting up Open-Project:"
openproject configure #non-interactive

passwords-add "Open-Project (http://<ip>)" "admin" "admin"
done-and-reboot
12 changes: 6 additions & 6 deletions utils/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ apt-upgrade()

echo ""
title "Upgrading the installed apps: "
sudo apt update
sudo apt upgrade -y
sudo apt autoremove -y
apt update
apt upgrade -y
apt autoremove -y

if [ $IS_DESKTOP -eq 1 ];
then
sudo snap refresh
snap refresh

if [ $(dpkg-query -W -f='${Status}' $1 2>/dev/null | grep -c "ok installed") -eq 0 ];
then
sudo flatpak update -y
flatpak update -y
fi
fi
}
Expand Down Expand Up @@ -663,7 +663,7 @@ startup(){
#Some packages are needed
echo ""
title "Installing requirements:"
sudo apt update
apt update
apt-install "dialog" #for requesting information
apt-install "ipcalc" #for static address validation

Expand Down
26 changes: 26 additions & 0 deletions utils/open-project-v12/installer.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
openproject/edition default
openproject/admin_email [email protected]

postgres/db_host 127.0.0.1
postgres/db_port 45432
postgres/db_name openproject
postgres/db_username openproject
postgres/db_password kFITfFsW1u4yrow6D7apAxpleXBBqkoE
postgres/addon_version v1
postgres/autoinstall install

server/autoinstall install
server/variant apache2
server/hostname open-project
server/server_path_prefix
server/ssl no

repositories/api-key fNiBfEDWTqmT0HGRoWCyHrNa1amG81Vu
repositories/svn-install install
repositories/svn-path /var/db/openproject/svn
repositories/apache-wrapper-token ZZKExtvjJwfH5I5aTMWmxmWGNgXFLArI
repositories/git-install install
repositories/git-path /var/db/openproject/git
repositories/git-http-backend /usr/lib/git-core/git-http-backend/

memcached/autoinstall install

0 comments on commit 73bda07

Please sign in to comment.