Add Update function to OpenProject

This commit is contained in:
Michel Roegl-Brunner 2025-03-24 09:52:04 +01:00
parent 126cd903b5
commit 976400af27
2 changed files with 22 additions and 19 deletions

View File

@ -20,15 +20,18 @@ color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /var ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_error "No Update Function Found!"
header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/openproject/installer.dat ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating ${APP}"
$STD apt-get update
$STD apt-get apt-get install --only-upgrade -y openproject
msg_ok "Updated ${APP}"
exit
}
start

View File

@ -16,12 +16,12 @@ install_core_deps
msg_info "Installing Dependencies"
$STD apt-get install -y \
sudo \
mc \
curl \
apt-transport-https \
ca-certificates \
gpg
sudo \
mc \
curl \
apt-transport-https \
ca-certificates \
gpg
msg_ok "Installed Dependencies"
msg_info "Adding Repository"
@ -48,11 +48,11 @@ API_KEY=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
{
echo "OpenProject-Credentials"
echo -e "OpenProject Database User: \e[32m$DB_USER\e[0m"
echo -e "OpenProject Database Password: \e[32m$DB_PASS\e[0m"
echo -e "OpenProject Database Name: \e[32m$DB_NAME\e[0m"
echo -e "OpenProject API Key: \e[32m$API_KEY\e[0m"
echo "OpenProject-Credentials"
echo -e "OpenProject Database User: \e[32m$DB_USER\e[0m"
echo -e "OpenProject Database Password: \e[32m$DB_PASS\e[0m"
echo -e "OpenProject Database Name: \e[32m$DB_NAME\e[0m"
echo -e "OpenProject API Key: \e[32m$API_KEY\e[0m"
} >>~/openproject.creds
msg_ok "Set up PostgreSQL"