Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Sam Heinz
2025-04-10 23:30:09 +10:00
636 changed files with 6711 additions and 4819 deletions
+13 -14
View File
@@ -26,21 +26,20 @@ $STD apt-get install -y \
openssh-server
msg_ok "Installed Dependencies"
msg_info "Setup PHP8.4 Repository"
msg_info "Adding PHP8.4 Repository"
$STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
$STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
$STD apt-get update
msg_ok "Setup PHP8.4 Repository"
msg_ok "Added PHP8.4 Repository"
msg_info "Setup PHP"
msg_info "Installing PHP"
$STD apt-get remove -y php8.2*
#$STD apt-get remove -y php8.3*
$STD apt-get install -y \
php8.3 \
php8.3-{mbstring,gd,intl,common,mysql,zip,xml} \
libapache2-mod-php8.3
msg_info "Setup PHP"
php8.4 \
php8.4-{gd,mysql,mbstring,bcmath,xml,curl,zip,intl} \
libapache2-mod-php8.4
msg_ok "Installed PHP"
msg_info "Setting up database"
DB_NAME=kimai_db
@@ -59,11 +58,11 @@ mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVI
msg_ok "Set up database"
msg_info "Installing Kimai (Patience)"
RELEASE=$(curl -s https://api.github.com/repos/kimai/kimai/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
wget -q "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip"
unzip -q ${RELEASE}.zip
mv kimai-${RELEASE} /opt/kimai
cd /opt/kimai
RELEASE=$(curl -fsSL https://api.github.com/repos/kimai/kimai/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip" -o $(basename "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip")
unzip -q "${RELEASE}".zip
mv kimai-"${RELEASE}" /opt/kimai
cd /opt/kimai || exit
echo "export COMPOSER_ALLOW_SUPERUSER=1" >>~/.bashrc
source ~/.bashrc
$STD composer install --no-dev --optimize-autoloader --no-interaction
@@ -132,7 +131,7 @@ motd_ssh
customize
msg_info "Cleaning up"
rm -rf ${RELEASE}.zip
rm -rf "${RELEASE}".zip
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"