mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-01 14:39:39 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e5c0e0169 |
+4
-18
@@ -24,22 +24,8 @@ msg_ok "Installed Dependencies"
|
|||||||
|
|
||||||
setup_mariadb
|
setup_mariadb
|
||||||
|
|
||||||
msg_info "Setting up database"
|
|
||||||
DB_NAME=glpi_db
|
|
||||||
DB_USER=glpi
|
|
||||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
|
||||||
mariadb-tzinfo-to-sql /usr/share/zoneinfo | mariadb mysql
|
mariadb-tzinfo-to-sql /usr/share/zoneinfo | mariadb mysql
|
||||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
MARIADB_DB_NAME="glpi_db" MARIADB_DB_USER="glpi" MARIADB_DB_EXTRA_GRANTS="GRANT SELECT ON \`mysql\`.\`time_zone_name\`" MARIADB_DB_CREDS_FILE="$HOME/glpi_db.creds" setup_mariadb_db
|
||||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
|
||||||
$STD mariadb -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost';"
|
|
||||||
$STD mariadb -u root -e "GRANT SELECT ON \`mysql\`.\`time_zone_name\` TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
|
||||||
cat <<EOF >~/glpi_db.creds
|
|
||||||
GLPI Database Credentials
|
|
||||||
Database: $DB_NAME
|
|
||||||
Username: $DB_USER
|
|
||||||
Password: $DB_PASS
|
|
||||||
EOF
|
|
||||||
msg_ok "Set up database"
|
|
||||||
|
|
||||||
msg_info "Installing GLPi"
|
msg_info "Installing GLPi"
|
||||||
cd /opt
|
cd /opt
|
||||||
@@ -85,9 +71,9 @@ msg_ok "Configured Downstream file"
|
|||||||
msg_info "Configuring GLPI Database"
|
msg_info "Configuring GLPI Database"
|
||||||
$STD /usr/bin/php /opt/glpi/bin/console db:install \
|
$STD /usr/bin/php /opt/glpi/bin/console db:install \
|
||||||
--db-host=localhost \
|
--db-host=localhost \
|
||||||
--db-name=$DB_NAME \
|
--db-name=glpi_db \
|
||||||
--db-user=$DB_USER \
|
--db-user=glpi \
|
||||||
--db-password=$DB_PASS \
|
--db-password=$MARIADB_DB_PASS \
|
||||||
--default-language=en_US \
|
--default-language=en_US \
|
||||||
--no-interaction \
|
--no-interaction \
|
||||||
--allow-superuser \
|
--allow-superuser \
|
||||||
|
|||||||
@@ -16,14 +16,7 @@ update_os
|
|||||||
JAVA_VERSION=21 setup_java
|
JAVA_VERSION=21 setup_java
|
||||||
PG_VERSION=16 setup_postgresql
|
PG_VERSION=16 setup_postgresql
|
||||||
|
|
||||||
msg_info "Configuring PostgreSQL"
|
PG_DB_NAME="keycloak" PG_DB_USER="keycloak" setup_postgresql_db
|
||||||
DB_NAME="keycloak"
|
|
||||||
DB_USER="keycloak"
|
|
||||||
DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)"
|
|
||||||
$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';"
|
|
||||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8';"
|
|
||||||
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;"
|
|
||||||
msg_ok "Configured PostgreSQL"
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "keycloak_app" "keycloak/keycloak" "prebuild" "latest" "/opt/keycloak" "keycloak-*.tar.gz"
|
fetch_and_deploy_gh_release "keycloak_app" "keycloak/keycloak" "prebuild" "latest" "/opt/keycloak" "keycloak-*.tar.gz"
|
||||||
|
|
||||||
@@ -43,8 +36,8 @@ Restart=always
|
|||||||
RestartSec=3
|
RestartSec=3
|
||||||
Environment="JAVA_HOME=/usr/lib/jvm/temurin-21-jdk-$(arch_resolve)"
|
Environment="JAVA_HOME=/usr/lib/jvm/temurin-21-jdk-$(arch_resolve)"
|
||||||
Environment="KC_DB=postgres"
|
Environment="KC_DB=postgres"
|
||||||
Environment="KC_DB_USERNAME=$DB_USER"
|
Environment="KC_DB_USERNAME=keycloak"
|
||||||
Environment="KC_DB_PASSWORD=$DB_PASS"
|
Environment="KC_DB_PASSWORD=$PG_DB_PASS"
|
||||||
Environment="KC_HTTP_ENABLED=true"
|
Environment="KC_HTTP_ENABLED=true"
|
||||||
Environment="KC_BOOTSTRAP_ADMIN_USERNAME=tmpadm"
|
Environment="KC_BOOTSTRAP_ADMIN_USERNAME=tmpadm"
|
||||||
Environment="KC_BOOTSTRAP_ADMIN_PASSWORD=admin123"
|
Environment="KC_BOOTSTRAP_ADMIN_PASSWORD=admin123"
|
||||||
|
|||||||
@@ -25,21 +25,8 @@ setup_mariadb
|
|||||||
PHP_VERSION="8.4" PHP_APACHE="YES" setup_php
|
PHP_VERSION="8.4" PHP_APACHE="YES" setup_php
|
||||||
setup_composer
|
setup_composer
|
||||||
|
|
||||||
msg_info "Setting up database"
|
|
||||||
DB_NAME=kimai_db
|
|
||||||
DB_USER=kimai
|
|
||||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
|
||||||
MYSQL_VERSION=$(mariadb --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
|
MYSQL_VERSION=$(mariadb --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
|
||||||
$STD mariadb -e "CREATE DATABASE $DB_NAME;"
|
MARIADB_DB_NAME="kimai_db" MARIADB_DB_USER="kimai" setup_mariadb_db
|
||||||
$STD mariadb -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
|
||||||
$STD mariadb -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
|
||||||
cat <<EOF >~/kimai.creds
|
|
||||||
Kimai-Credentials
|
|
||||||
Kimai Database User: $DB_USER
|
|
||||||
Kimai Database Password: $DB_PASS
|
|
||||||
Kimai Database Name: $DB_NAME
|
|
||||||
EOF
|
|
||||||
msg_ok "Set up database"
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "kimai" "kimai/kimai" "tarball"
|
fetch_and_deploy_gh_release "kimai" "kimai/kimai" "tarball"
|
||||||
|
|
||||||
@@ -50,7 +37,7 @@ echo "export COMPOSER_ALLOW_SUPERUSER=1" >>~/.bashrc
|
|||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||||
cp .env.dist .env
|
cp .env.dist .env
|
||||||
sed -i "/^DATABASE_URL=.*/c\DATABASE_URL=mysql://$DB_USER:$DB_PASS@127.0.0.1:3306/$DB_NAME?charset=utf8mb4&serverVersion=mariadb-$MYSQL_VERSION" /opt/kimai/.env
|
sed -i "/^DATABASE_URL=.*/c\DATABASE_URL=mysql://kimai:$MARIADB_DB_PASS@127.0.0.1:3306/kimai_db?charset=utf8mb4&serverVersion=mariadb-$MYSQL_VERSION" /opt/kimai/.env
|
||||||
sed -i "s|^APP_SECRET=.*|APP_SECRET=$APP_SECRET|" /opt/kimai/.env
|
sed -i "s|^APP_SECRET=.*|APP_SECRET=$APP_SECRET|" /opt/kimai/.env
|
||||||
$STD bin/console kimai:install -n
|
$STD bin/console kimai:install -n
|
||||||
$STD expect <<EOF
|
$STD expect <<EOF
|
||||||
|
|||||||
@@ -16,20 +16,7 @@ update_os
|
|||||||
PHP_VERSION="8.3" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="imap,ldap" setup_php
|
PHP_VERSION="8.3" PHP_APACHE="YES" PHP_FPM="YES" PHP_MODULE="imap,ldap" setup_php
|
||||||
setup_mariadb
|
setup_mariadb
|
||||||
|
|
||||||
msg_info "Configuring MariaDB Database"
|
MARIADB_DB_NAME="limesurvey_db" MARIADB_DB_USER="limesurvey" setup_mariadb_db
|
||||||
DB_NAME=limesurvey_db
|
|
||||||
DB_USER=limesurvey
|
|
||||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
|
||||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
|
|
||||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
|
||||||
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
|
||||||
cat <<EOF >~/limesurvey.creds
|
|
||||||
LimeSurvey-Credentials
|
|
||||||
LimeSurvey Database User: $DB_USER
|
|
||||||
LimeSurvey Database Password: $DB_PASS
|
|
||||||
LimeSurvey Database Name: $DB_NAME
|
|
||||||
EOF
|
|
||||||
msg_ok "Configured MariaDB Database"
|
|
||||||
|
|
||||||
msg_info "Setting up LimeSurvey"
|
msg_info "Setting up LimeSurvey"
|
||||||
temp_file=$(mktemp)
|
temp_file=$(mktemp)
|
||||||
|
|||||||
@@ -15,26 +15,14 @@ update_os
|
|||||||
|
|
||||||
PG_VERSION="17" setup_postgresql
|
PG_VERSION="17" setup_postgresql
|
||||||
|
|
||||||
msg_info "Configuring PostgreSQL"
|
PG_DB_NAME="listmonk" PG_DB_USER="listmonk" setup_postgresql_db
|
||||||
DB_NAME=listmonk
|
|
||||||
DB_USER=listmonk
|
|
||||||
DB_PASS=$(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;"
|
|
||||||
cat <<EOF >~/listmonk.creds
|
|
||||||
listmonk-Credentials
|
|
||||||
listmonk Database User: $DB_USER
|
|
||||||
listmonk Database Password: $DB_PASS
|
|
||||||
listmonk Database Name: $DB_NAME
|
|
||||||
EOF
|
|
||||||
msg_ok "Configured PostgreSQL"
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "listmonk" "knadh/listmonk" "prebuild" "latest" "/opt/listmonk" "listmonk*linux_$(arch_resolve).tar.gz"
|
fetch_and_deploy_gh_release "listmonk" "knadh/listmonk" "prebuild" "latest" "/opt/listmonk" "listmonk*linux_$(arch_resolve).tar.gz"
|
||||||
|
|
||||||
msg_info "Configuring listmonk"
|
msg_info "Configuring listmonk"
|
||||||
mkdir -p /opt/listmonk/uploads
|
mkdir -p /opt/listmonk/uploads
|
||||||
$STD /opt/listmonk/listmonk --new-config --config /opt/listmonk/config.toml
|
$STD /opt/listmonk/listmonk --new-config --config /opt/listmonk/config.toml
|
||||||
sed -i -e 's/address = "localhost:9000"/address = "0.0.0.0:9000"/' -e 's/^password = ".*"/password = "'"$DB_PASS"'"/' /opt/listmonk/config.toml
|
sed -i -e 's/address = "localhost:9000"/address = "0.0.0.0:9000"/' -e 's/^password = ".*"/password = "'"$PG_DB_PASS"'"/' /opt/listmonk/config.toml
|
||||||
$STD /opt/listmonk/listmonk --install --yes --config /opt/listmonk/config.toml
|
$STD /opt/listmonk/listmonk --install --yes --config /opt/listmonk/config.toml
|
||||||
msg_ok "Configured listmonk"
|
msg_ok "Configured listmonk"
|
||||||
|
|
||||||
|
|||||||
@@ -20,31 +20,18 @@ msg_ok "Installed dependencies"
|
|||||||
NODE_VERSION="22" setup_nodejs
|
NODE_VERSION="22" setup_nodejs
|
||||||
setup_mariadb
|
setup_mariadb
|
||||||
|
|
||||||
msg_info "Setting up Database"
|
MARIADB_DB_NAME="mmdl" MARIADB_DB_USER="mmdl" MARIADB_DB_CREDS_FILE="$HOME/mmdl.creds" setup_mariadb_db
|
||||||
DB_NAME="mmdl"
|
|
||||||
DB_USER="mmdl"
|
|
||||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
|
||||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
|
||||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED by '$DB_PASS';"
|
|
||||||
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
|
||||||
cat <<EOF >~/mmdl.creds
|
|
||||||
Manage My Damn Life Credentials
|
|
||||||
Database User: $DB_USER
|
|
||||||
Database Password: $DB_PASS
|
|
||||||
Database Name: $DB_NAME
|
|
||||||
EOF
|
|
||||||
msg_ok "Set up Database"
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "mmdl" "intri-in/manage-my-damn-life-nextjs" "tarball"
|
fetch_and_deploy_gh_release "mmdl" "intri-in/manage-my-damn-life-nextjs" "tarball"
|
||||||
|
|
||||||
msg_info "Configuring ${APPLICATION}"
|
msg_info "Configuring ${APPLICATION}"
|
||||||
cp /opt/mmdl/sample.env.local /opt/mmdl/.env
|
cp /opt/mmdl/sample.env.local /opt/mmdl/.env
|
||||||
sed -i -e 's|db|localhost|' \
|
sed -i -e 's|db|localhost|' \
|
||||||
-e "s|myuser|${DB_USER}|" \
|
-e "s|myuser|mmdl|" \
|
||||||
-e "s|mypassword|${DB_PASS}|" \
|
-e "s|mypassword|${MARIADB_DB_PASS}|" \
|
||||||
-e 's|5433|3306|' \
|
-e 's|5433|3306|' \
|
||||||
-e 's|DB_DIALECT=postgres|DB_DIALECT=mysql|' \
|
-e 's|DB_DIALECT=postgres|DB_DIALECT=mysql|' \
|
||||||
-e "s|sample_install_mmdm|${DB_NAME}|" \
|
-e "s|sample_install_mmdm|mmdl|" \
|
||||||
-e "s|=PASSWORD|=$(openssl rand -base64 40 | tr -dc 'a-zA-Z0-9' | head -c40)|" \
|
-e "s|=PASSWORD|=$(openssl rand -base64 40 | tr -dc 'a-zA-Z0-9' | head -c40)|" \
|
||||||
/opt/mmdl/.env
|
/opt/mmdl/.env
|
||||||
cd /opt/mmdl
|
cd /opt/mmdl
|
||||||
|
|||||||
@@ -26,22 +26,7 @@ fi
|
|||||||
|
|
||||||
PG_VERSION="16" setup_postgresql
|
PG_VERSION="16" setup_postgresql
|
||||||
|
|
||||||
msg_info "Setting up PostgreSQL"
|
PG_DB_NAME="mattermost" PG_DB_USER="mmuser" setup_postgresql_db
|
||||||
DB_NAME=mattermost
|
|
||||||
DB_USER=mmuser
|
|
||||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
|
||||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME;"
|
|
||||||
$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';"
|
|
||||||
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME OWNER TO $DB_USER;"
|
|
||||||
$STD sudo -u postgres psql -c "GRANT USAGE, CREATE ON SCHEMA PUBLIC TO $DB_USER;"
|
|
||||||
cat <<EOF >~/mattermost.creds
|
|
||||||
Mattermost Credentials
|
|
||||||
Database User: $DB_USER
|
|
||||||
Database Password: $DB_PASS
|
|
||||||
Database Name: $DB_NAME
|
|
||||||
EOF
|
|
||||||
msg_ok "Set up PostgreSQL"
|
|
||||||
|
|
||||||
msg_info "Installing Mattermost"
|
msg_info "Installing Mattermost"
|
||||||
curl -fsSL -o /usr/share/keyrings/mattermost-archive-keyring.gpg https://deb.packages.mattermost.com/pubkey.gpg
|
curl -fsSL -o /usr/share/keyrings/mattermost-archive-keyring.gpg https://deb.packages.mattermost.com/pubkey.gpg
|
||||||
@@ -49,7 +34,7 @@ sh -c 'curl -fsSL https://deb.packages.mattermost.com/repo-setup.sh | sudo bash
|
|||||||
apt_update_safe
|
apt_update_safe
|
||||||
$STD apt install -y mattermost
|
$STD apt install -y mattermost
|
||||||
$STD install -C -m 600 -o mattermost -g mattermost /opt/mattermost/config/config.defaults.json /opt/mattermost/config/config.json
|
$STD install -C -m 600 -o mattermost -g mattermost /opt/mattermost/config/config.defaults.json /opt/mattermost/config/config.json
|
||||||
sed -i -e "/DataSource/c\ \"DataSource\": \"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME?sslmode=disable&connect_timeout=10\"," \
|
sed -i -e "/DataSource/c\ \"DataSource\": \"postgres://mmuser:$PG_DB_PASS@localhost:5432/mattermost?sslmode=disable&connect_timeout=10\"," \
|
||||||
-e "/SiteURL/c\ \"SiteURL\": \"http://$LOCAL_IP:8065\"," /opt/mattermost/config/config.json
|
-e "/SiteURL/c\ \"SiteURL\": \"http://$LOCAL_IP:8065\"," /opt/mattermost/config/config.json
|
||||||
systemctl enable -q --now mattermost
|
systemctl enable -q --now mattermost
|
||||||
msg_ok "Installed Mattermost"
|
msg_ok "Installed Mattermost"
|
||||||
|
|||||||
@@ -22,20 +22,7 @@ setup_yq
|
|||||||
NODE_VERSION="24" setup_nodejs
|
NODE_VERSION="24" setup_nodejs
|
||||||
PG_VERSION="17" setup_postgresql
|
PG_VERSION="17" setup_postgresql
|
||||||
|
|
||||||
msg_info "Setting up PostgreSQL"
|
PG_DB_NAME="mm_db" PG_DB_USER="mm_user" setup_postgresql_db
|
||||||
DB_NAME="mm_db"
|
|
||||||
DB_USER="mm_user"
|
|
||||||
DB_PASS="$(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;"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
|
||||||
cat <<EOF >~/mediamanager.creds
|
|
||||||
MediaManager Credentials
|
|
||||||
MediaManager Database User: $DB_USER
|
|
||||||
MediaManager Database Password: $DB_PASS
|
|
||||||
MediaManager Database Name: $DB_NAME
|
|
||||||
EOF
|
|
||||||
msg_ok "Set up PostgreSQL"
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "MediaManager" "maxdorninger/MediaManager" "tarball" "latest" "/opt/mediamanager"
|
fetch_and_deploy_gh_release "MediaManager" "maxdorninger/MediaManager" "tarball" "latest" "/opt/mediamanager"
|
||||||
UV_PROJECT_DIR="/opt/mediamanager" setup_uv
|
UV_PROJECT_DIR="/opt/mediamanager" setup_uv
|
||||||
@@ -65,9 +52,9 @@ SECRET="$(openssl rand -hex 32)"
|
|||||||
sed -e "s/localhost:8/$LOCAL_IP:8/g" \
|
sed -e "s/localhost:8/$LOCAL_IP:8/g" \
|
||||||
-e "s|/data/|$MEDIA_DIR/|g" \
|
-e "s|/data/|$MEDIA_DIR/|g" \
|
||||||
-e 's/"db"/"localhost"/' \
|
-e 's/"db"/"localhost"/' \
|
||||||
-e "s/user = \"MediaManager\"/user = \"$DB_USER\"/" \
|
-e "s/user = \"MediaManager\"/user = \"mm_user\"/" \
|
||||||
-e "s/password = \"MediaManager\"/password = \"$DB_PASS\"/" \
|
-e "s/password = \"MediaManager\"/password = \"$PG_DB_PASS\"/" \
|
||||||
-e "s/dbname = \"MediaManager\"/dbname = \"$DB_NAME\"/" \
|
-e "s/dbname = \"MediaManager\"/dbname = \"mm_db\"/" \
|
||||||
-e "/^token_secret/s/=.*/= \"$SECRET\"/" \
|
-e "/^token_secret/s/=.*/= \"$SECRET\"/" \
|
||||||
-e "s/admin@example.com/$EMAIL/" \
|
-e "s/admin@example.com/$EMAIL/" \
|
||||||
-e '/^admin_emails/s/, .*/]/' \
|
-e '/^admin_emails/s/, .*/]/' \
|
||||||
|
|||||||
+3
-18
@@ -29,29 +29,14 @@ curl -fsSL https://nightly.odoo.com/${RELEASE}/nightly/deb/odoo_${RELEASE}.lates
|
|||||||
$STD apt install -y /opt/odoo.deb
|
$STD apt install -y /opt/odoo.deb
|
||||||
msg_ok "Setup Odoo $RELEASE"
|
msg_ok "Setup Odoo $RELEASE"
|
||||||
|
|
||||||
msg_info "Setup PostgreSQL Database"
|
PG_DB_NAME="odoo" PG_DB_USER="odoo_usr" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db
|
||||||
DB_NAME="odoo"
|
|
||||||
DB_USER="odoo_usr"
|
|
||||||
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
|
||||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME;"
|
|
||||||
$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';"
|
|
||||||
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME OWNER TO $DB_USER;"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;"
|
|
||||||
cat <<EOF >~/odoo.creds
|
|
||||||
Odoo-Credentials
|
|
||||||
Odoo Database User: $DB_USER
|
|
||||||
Odoo Database Password: $DB_PASS
|
|
||||||
Odoo Database Name: $DB_NAME
|
|
||||||
EOF
|
|
||||||
msg_ok "Setup PostgreSQL"
|
|
||||||
|
|
||||||
msg_info "Configuring Odoo"
|
msg_info "Configuring Odoo"
|
||||||
sed -i \
|
sed -i \
|
||||||
-e "s|^;*db_host *=.*|db_host = localhost|" \
|
-e "s|^;*db_host *=.*|db_host = localhost|" \
|
||||||
-e "s|^;*db_port *=.*|db_port = 5432|" \
|
-e "s|^;*db_port *=.*|db_port = 5432|" \
|
||||||
-e "s|^;*db_user *=.*|db_user = $DB_USER|" \
|
-e "s|^;*db_user *=.*|db_user = odoo_usr|" \
|
||||||
-e "s|^;*db_password *=.*|db_password = $DB_PASS|" \
|
-e "s|^;*db_password *=.*|db_password = $PG_DB_PASS|" \
|
||||||
/etc/odoo/odoo.conf
|
/etc/odoo/odoo.conf
|
||||||
$STD sudo -u odoo odoo -c /etc/odoo/odoo.conf -d odoo -i base --stop-after-init
|
$STD sudo -u odoo odoo -c /etc/odoo/odoo.conf -d odoo -i base --stop-after-init
|
||||||
rm -f /opt/odoo.deb
|
rm -f /opt/odoo.deb
|
||||||
|
|||||||
@@ -21,22 +21,7 @@ msg_ok "Installed Dependencies"
|
|||||||
|
|
||||||
PG_VERSION="16" setup_postgresql
|
PG_VERSION="16" setup_postgresql
|
||||||
|
|
||||||
msg_info "Setup Database"
|
PG_DB_NAME="onlyoffice" PG_DB_USER="onlyoffice_user" setup_postgresql_db
|
||||||
DB_NAME=onlyoffice
|
|
||||||
DB_USER=onlyoffice_user
|
|
||||||
DB_PASS=$(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 ENCODING 'UTF8' TEMPLATE template0;"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
|
||||||
cat <<EOF >~/onlyoffice.creds
|
|
||||||
ONLYOFFICE-Credentials
|
|
||||||
ONLYOFFICE Database User: $DB_USER
|
|
||||||
ONLYOFFICE Database Password: $DB_PASS
|
|
||||||
ONLYOFFICE Database Name: $DB_NAME
|
|
||||||
EOF
|
|
||||||
msg_ok "Set up Database"
|
|
||||||
|
|
||||||
msg_info "Adding ONLYOFFICE GPG Key"
|
msg_info "Adding ONLYOFFICE GPG Key"
|
||||||
GPG_TMP="/tmp/onlyoffice.gpg"
|
GPG_TMP="/tmp/onlyoffice.gpg"
|
||||||
@@ -72,16 +57,16 @@ $STD rabbitmqctl set_permissions -p / $RMQ_USER ".*" ".*" ".*"
|
|||||||
$STD rabbitmqctl set_user_tags $RMQ_USER administrator
|
$STD rabbitmqctl set_user_tags $RMQ_USER administrator
|
||||||
|
|
||||||
echo onlyoffice-documentserver onlyoffice/db-host string localhost | debconf-set-selections
|
echo onlyoffice-documentserver onlyoffice/db-host string localhost | debconf-set-selections
|
||||||
echo onlyoffice-documentserver onlyoffice/db-user string $DB_USER | debconf-set-selections
|
echo onlyoffice-documentserver onlyoffice/db-user string onlyoffice_user | debconf-set-selections
|
||||||
echo onlyoffice-documentserver onlyoffice/db-pwd password $DB_PASS | debconf-set-selections
|
echo onlyoffice-documentserver onlyoffice/db-pwd password $PG_DB_PASS | debconf-set-selections
|
||||||
echo onlyoffice-documentserver onlyoffice/db-name string $DB_NAME | debconf-set-selections
|
echo onlyoffice-documentserver onlyoffice/db-name string onlyoffice | debconf-set-selections
|
||||||
echo onlyoffice-documentserver onlyoffice/rabbitmq-host string localhost | debconf-set-selections
|
echo onlyoffice-documentserver onlyoffice/rabbitmq-host string localhost | debconf-set-selections
|
||||||
echo onlyoffice-documentserver onlyoffice/rabbitmq-user string $RMQ_USER | debconf-set-selections
|
echo onlyoffice-documentserver onlyoffice/rabbitmq-user string $RMQ_USER | debconf-set-selections
|
||||||
echo onlyoffice-documentserver onlyoffice/rabbitmq-pwd password $RMQ_PASS | debconf-set-selections
|
echo onlyoffice-documentserver onlyoffice/rabbitmq-pwd password $RMQ_PASS | debconf-set-selections
|
||||||
echo onlyoffice-documentserver onlyoffice/jwt-enabled boolean true | debconf-set-selections
|
echo onlyoffice-documentserver onlyoffice/jwt-enabled boolean true | debconf-set-selections
|
||||||
echo onlyoffice-documentserver onlyoffice/jwt-secret password $JWT_SECRET | debconf-set-selections
|
echo onlyoffice-documentserver onlyoffice/jwt-secret password $JWT_SECRET | debconf-set-selections
|
||||||
|
|
||||||
cat <<EOF >~/onlyoffice.creds
|
cat <<EOF >>~/onlyoffice.creds
|
||||||
|
|
||||||
ONLYOFFICE RabbitMQ Credentials
|
ONLYOFFICE RabbitMQ Credentials
|
||||||
User: $RMQ_USER
|
User: $RMQ_USER
|
||||||
|
|||||||
@@ -27,28 +27,18 @@ setup_composer
|
|||||||
fetch_and_deploy_gh_release "paymenter" "paymenter/paymenter" "prebuild" "latest" "/opt/paymenter" "paymenter.tar.gz"
|
fetch_and_deploy_gh_release "paymenter" "paymenter/paymenter" "prebuild" "latest" "/opt/paymenter" "paymenter.tar.gz"
|
||||||
chmod -R 755 /opt/paymenter/storage/* /opt/paymenter/bootstrap/cache/
|
chmod -R 755 /opt/paymenter/storage/* /opt/paymenter/bootstrap/cache/
|
||||||
|
|
||||||
msg_info "Setting up database"
|
|
||||||
DB_NAME=paymenter
|
|
||||||
DB_USER=paymenter
|
|
||||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
|
||||||
mariadb-tzinfo-to-sql /usr/share/zoneinfo | mariadb mysql
|
mariadb-tzinfo-to-sql /usr/share/zoneinfo | mariadb mysql
|
||||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
MARIADB_DB_NAME="paymenter" MARIADB_DB_USER="paymenter" MARIADB_DB_CREDS_FILE="$HOME/paymenter_db.creds" setup_mariadb_db
|
||||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
|
||||||
$STD mariadb -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost' WITH GRANT OPTION;"
|
msg_info "Setting up database"
|
||||||
cat <<EOF >~/paymenter_db.creds
|
|
||||||
Paymenter Database Credentials
|
|
||||||
Database: $DB_NAME
|
|
||||||
Username: $DB_USER
|
|
||||||
Password: $DB_PASS
|
|
||||||
EOF
|
|
||||||
cd /opt/paymenter
|
cd /opt/paymenter
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||||
$STD php artisan key:generate --force
|
$STD php artisan key:generate --force
|
||||||
$STD php artisan storage:link
|
$STD php artisan storage:link
|
||||||
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=${DB_NAME}/" .env
|
sed -i "s/^DB_DATABASE=.*/DB_DATABASE=paymenter/" .env
|
||||||
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=${DB_USER}/" .env
|
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=paymenter/" .env
|
||||||
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=${DB_PASS}/" .env
|
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=${MARIADB_DB_PASS}/" .env
|
||||||
$STD php artisan migrate --force --seed
|
$STD php artisan migrate --force --seed
|
||||||
msg_ok "Set up database"
|
msg_ok "Set up database"
|
||||||
|
|
||||||
|
|||||||
@@ -23,22 +23,7 @@ msg_ok "Installed dependencies"
|
|||||||
NODE_VERSION="24" setup_nodejs
|
NODE_VERSION="24" setup_nodejs
|
||||||
PG_VERSION="16" setup_postgresql
|
PG_VERSION="16" setup_postgresql
|
||||||
|
|
||||||
msg_info "Setting up PostgreSQL Database"
|
PG_DB_NAME="planka" PG_DB_USER="planka" setup_postgresql_db
|
||||||
DB_NAME=planka
|
|
||||||
DB_USER=planka
|
|
||||||
DB_PASS=$(openssl rand -base64 16 | tr -d '/+=')
|
|
||||||
$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 ENCODING 'UTF8' TEMPLATE template0;"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
|
||||||
cat <<EOF >~/planka.creds
|
|
||||||
PLANKA DB Credentials
|
|
||||||
PLANKA Database User: $DB_USER
|
|
||||||
PLANKA Database Password: $DB_PASS
|
|
||||||
PLANKA Database Name: $DB_NAME
|
|
||||||
EOF
|
|
||||||
msg_ok "Set up PostgreSQL Database"
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "planka" "plankanban/planka" "prebuild" "latest" "/opt/planka" "planka-prebuild.zip"
|
fetch_and_deploy_gh_release "planka" "plankanban/planka" "prebuild" "latest" "/opt/planka" "planka-prebuild.zip"
|
||||||
|
|
||||||
@@ -48,7 +33,7 @@ cd /opt/planka
|
|||||||
$STD npm install
|
$STD npm install
|
||||||
cp .env.sample .env
|
cp .env.sample .env
|
||||||
sed -i "s#http://localhost:1337#http://$LOCAL_IP:1337#g" /opt/planka/.env
|
sed -i "s#http://localhost:1337#http://$LOCAL_IP:1337#g" /opt/planka/.env
|
||||||
sed -i "s#postgres@localhost#planka:$DB_PASS@localhost#g" /opt/planka/.env
|
sed -i "s#postgres@localhost#planka:$PG_DB_PASS@localhost#g" /opt/planka/.env
|
||||||
sed -i "s#notsecretkey#$SECRET_KEY#g" /opt/planka/.env
|
sed -i "s#notsecretkey#$SECRET_KEY#g" /opt/planka/.env
|
||||||
mkdir -p /opt/planka/data/protected/{favicons,user-avatars,background-images} /opt/planka/data/private/attachments
|
mkdir -p /opt/planka/data/protected/{favicons,user-avatars,background-images} /opt/planka/data/private/attachments
|
||||||
$STD npm run db:init
|
$STD npm run db:init
|
||||||
@@ -67,7 +52,7 @@ echo "DEFAULT_ADMIN_NAME=$ADMIN_NAME" >>.env
|
|||||||
echo "DEFAULT_ADMIN_USERNAME=$ADMIN_USERNAME" >>.env
|
echo "DEFAULT_ADMIN_USERNAME=$ADMIN_USERNAME" >>.env
|
||||||
$STD npm run db:seed
|
$STD npm run db:seed
|
||||||
sed -i '/# Temporary admin user creation settings/,$d' .env
|
sed -i '/# Temporary admin user creation settings/,$d' .env
|
||||||
cat <<EOF >~/planka.creds
|
cat <<EOF >>~/planka.creds
|
||||||
|
|
||||||
PLANKA Admin Credentials
|
PLANKA Admin Credentials
|
||||||
Admin Email: $ADMIN_EMAIL
|
Admin Email: $ADMIN_EMAIL
|
||||||
|
|||||||
@@ -45,20 +45,7 @@ $STD apt install -y \
|
|||||||
libapache2-mod-php8.4
|
libapache2-mod-php8.4
|
||||||
msg_ok "Installed PHP"
|
msg_ok "Installed PHP"
|
||||||
|
|
||||||
msg_info "Setting up MariaDB"
|
MARIADB_DB_NAME="panel" MARIADB_DB_USER="pterodactyl" MARIADB_DB_CREDS_FILE="$HOME/pterodactyl-panel.creds" setup_mariadb_db
|
||||||
DB_NAME=panel
|
|
||||||
DB_USER=pterodactyl
|
|
||||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
|
||||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
|
||||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
|
||||||
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
|
||||||
cat <<EOF >~/pterodactyl-panel.creds
|
|
||||||
pterodactyl Panel-Credentials
|
|
||||||
pterodactyl Panel Database User: $DB_USER
|
|
||||||
pterodactyl Panel Database Password: $DB_PASS
|
|
||||||
pterodactyl Panel Database Name: $DB_NAME
|
|
||||||
EOF
|
|
||||||
msg_ok "Set up MariaDB"
|
|
||||||
|
|
||||||
read -p "${TAB3}Provide an email address for admin login, this should be a valid email address: " ADMIN_EMAIL
|
read -p "${TAB3}Provide an email address for admin login, this should be a valid email address: " ADMIN_EMAIL
|
||||||
read -p "${TAB3}Enter your First Name: " NAME_FIRST
|
read -p "${TAB3}Enter your First Name: " NAME_FIRST
|
||||||
@@ -75,14 +62,14 @@ ADMIN_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
|||||||
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||||
$STD php artisan key:generate --force
|
$STD php artisan key:generate --force
|
||||||
$STD php artisan p:environment:setup --no-interaction --author "$ADMIN_EMAIL" --url "http://$LOCAL_IP"
|
$STD php artisan p:environment:setup --no-interaction --author "$ADMIN_EMAIL" --url "http://$LOCAL_IP"
|
||||||
$STD php artisan p:environment:database --no-interaction --database $DB_NAME --username $DB_USER --password "$DB_PASS"
|
$STD php artisan p:environment:database --no-interaction --database panel --username pterodactyl --password "$MARIADB_DB_PASS"
|
||||||
$STD php artisan migrate --seed --force --no-interaction
|
$STD php artisan migrate --seed --force --no-interaction
|
||||||
$STD php artisan p:user:make --no-interaction --admin=1 --email "$ADMIN_EMAIL" --password "$ADMIN_PASS" --name-first "$NAME_FIRST" --name-last "$NAME_LAST" --username "admin"
|
$STD php artisan p:user:make --no-interaction --admin=1 --email "$ADMIN_EMAIL" --password "$ADMIN_PASS" --name-first "$NAME_FIRST" --name-last "$NAME_LAST" --username "admin"
|
||||||
echo "* * * * * php /opt/pterodactyl-panel/artisan schedule:run >> /dev/null 2>&1" | crontab -u www-data -
|
echo "* * * * * php /opt/pterodactyl-panel/artisan schedule:run >> /dev/null 2>&1" | crontab -u www-data -
|
||||||
chown -R www-data:www-data /opt/pterodactyl-panel/*
|
chown -R www-data:www-data /opt/pterodactyl-panel/*
|
||||||
chmod -R 755 /opt/pterodactyl-panel/storage/* /opt/pterodactyl-panel/bootstrap/cache/
|
chmod -R 755 /opt/pterodactyl-panel/storage/* /opt/pterodactyl-panel/bootstrap/cache/
|
||||||
ln -s /opt/pterodactyl-panel /var/www/pterodactyl
|
ln -s /opt/pterodactyl-panel /var/www/pterodactyl
|
||||||
cat <<EOF >~/pterodactyl-panel.creds
|
cat <<EOF >>~/pterodactyl-panel.creds
|
||||||
|
|
||||||
pterodactyl Admin Username: admin
|
pterodactyl Admin Username: admin
|
||||||
pterodactyl Admin Email: $ADMIN_EMAIL
|
pterodactyl Admin Email: $ADMIN_EMAIL
|
||||||
|
|||||||
Reference in New Issue
Block a user