diff --git a/scripts/open-project-v12.sh b/scripts/open-project-v12.sh new file mode 100755 index 0000000..9a87fff --- /dev/null +++ b/scripts/open-project-v12.sh @@ -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://)" "admin" "admin" +done-and-reboot \ No newline at end of file diff --git a/utils/main.sh b/utils/main.sh index ea8c385..6888a90 100755 --- a/utils/main.sh +++ b/utils/main.sh @@ -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 } @@ -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 diff --git a/utils/open-project-v12/installer.dat b/utils/open-project-v12/installer.dat new file mode 100644 index 0000000..40f228b --- /dev/null +++ b/utils/open-project-v12/installer.dat @@ -0,0 +1,26 @@ +openproject/edition default +openproject/admin_email admin@admin.com + +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 \ No newline at end of file