mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-10 17:34:41 +00:00
Refactor (#6869)
This commit is contained in:
parent
032709e107
commit
ee74400626
3 changed files with 14 additions and 31 deletions
|
@ -13,13 +13,9 @@ setting_up_container
|
|||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
libapache2-mod-php \
|
||||
php8.2-{curl,mbstring,mysql,xml,zip,gd}
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PHP_VERSION="8.3" PHP_MODULE="mysql" PHP_APACHE="YES" PHP_MAX_EXECUTION_TIME="600" setup_php
|
||||
setup_mariadb
|
||||
fetch_and_deploy_gh_release "wavelog" "wavelog/wavelog" "tarball"
|
||||
|
||||
msg_info "Setting up Database"
|
||||
DB_NAME=wavelog
|
||||
|
@ -36,22 +32,11 @@ $STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUS
|
|||
} >>~/wavelog.creds
|
||||
msg_ok "Set up database"
|
||||
|
||||
msg_info "Setting up PHP"
|
||||
sed -i '/max_execution_time/s/= .*/= 600/' /etc/php/8.2/apache2/php.ini
|
||||
sed -i '/memory_limit/s/= .*/= 256M/' /etc/php/8.2/apache2/php.ini
|
||||
sed -i '/upload_max_filesize/s/= .*/= 8M/' /etc/php/8.2/apache2/php.ini
|
||||
msg_ok "Set up PHP"
|
||||
|
||||
msg_info "Installing Wavelog"
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/wavelog/wavelog/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
curl -fsSL "https://github.com/wavelog/wavelog/archive/refs/tags/${RELEASE}.zip" -o "${RELEASE}.zip"
|
||||
$STD unzip ${RELEASE}.zip
|
||||
mv wavelog-${RELEASE}/ /opt/wavelog
|
||||
msg_info "Configuring Wavelog"
|
||||
chown -R www-data:www-data /opt/wavelog/
|
||||
find /opt/wavelog/ -type d -exec chmod 755 {} \;
|
||||
find /opt/wavelog/ -type f -exec chmod 664 {} \;
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed Wavelog"
|
||||
msg_ok "Configured Wavelog"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/apache2/sites-available/wavelog.conf
|
||||
|
@ -78,7 +63,6 @@ motd_ssh
|
|||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -f ${RELEASE}.zip
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue