Requested changes by team

This commit is contained in:
montagneid
2026-05-12 13:36:00 +02:00
parent fee42171ea
commit 522e949dc3
2 changed files with 4 additions and 20 deletions

View File

@@ -39,8 +39,6 @@ function update_script() {
msg_info "Updating Umbraco Templates" msg_info "Updating Umbraco Templates"
$STD dotnet new update $STD dotnet new update
msg_ok "Updated Umbraco Templates" msg_ok "Updated Umbraco Templates"
msg_ok "Update completed successfully!"
exit exit
} }

View File

@@ -16,7 +16,7 @@ update_os
var_project_name="cms" var_project_name="cms"
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y \ $STD apt install -y \
ca-certificates \ ca-certificates \
uuid-runtime \ uuid-runtime \
nginx \ nginx \
@@ -24,12 +24,8 @@ $STD apt-get install -y \
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Installing .NET SDK 10.0" msg_info "Installing .NET SDK 10.0"
$STD wget https://packages.microsoft.com/config/debian/13/packages-microsoft-prod.deb -O packages-microsoft-prod.deb setup_deb822 "microsoft" "https://packages.microsoft.com/config/debian/13/packages-microsoft-prod.deb"
$STD dpkg -i packages-microsoft-prod.deb $STD apt install -y dotnet-sdk-10.0
$STD rm packages-microsoft-prod.deb
$STD apt-get update && \
$STD apt-get install -y dotnet-sdk-10.0
msg_ok "Installed .NET SDK 10.0" msg_ok "Installed .NET SDK 10.0"
msg_info "Installing dotnet Umbraco templates and create project (Patience)" msg_info "Installing dotnet Umbraco templates and create project (Patience)"
@@ -41,7 +37,6 @@ msg_ok "Umbraco templates installed and project created"
msg_info "Configuring database connection and unattended setup" msg_info "Configuring database connection and unattended setup"
cd /var/www/html/$var_project_name cd /var/www/html/$var_project_name
UMBRACO_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) UMBRACO_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
jq --arg umbracopass "$UMBRACO_PASS" '. + { jq --arg umbracopass "$UMBRACO_PASS" '. + {
"ConnectionStrings": { "ConnectionStrings": {
"umbracoDbDSN": "Data Source=|DataDirectory|/Umbraco.sqlite.db;Cache=Shared;Foreign Keys=True;Pooling=True", "umbracoDbDSN": "Data Source=|DataDirectory|/Umbraco.sqlite.db;Cache=Shared;Foreign Keys=True;Pooling=True",
@@ -64,7 +59,6 @@ msg_ok "Database connection and unattended setup configured"
msg_info "Setting up Nginx Server" msg_info "Setting up Nginx Server"
rm -f /var/www/html/index.nginx-debian.html rm -f /var/www/html/index.nginx-debian.html
cat <<EOF >/etc/nginx/sites-available/default cat <<EOF >/etc/nginx/sites-available/default
map \$http_connection \$connection_upgrade { map \$http_connection \$connection_upgrade {
"~*Upgrade" \$http_connection; "~*Upgrade" \$http_connection;
@@ -91,11 +85,7 @@ server {
} }
} }
EOF EOF
create_self_signed_certificate "/etc/nginx/certificate" "nginx-certificate.crt" "nginx.key" "localhost"
mkdir /etc/nginx/certificate
cd /etc/nginx/certificate
openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out nginx-certificate.crt -keyout nginx.key -subj "/C=NL/ST=State/L=City/O=Organization/CN=localhost" &>/dev/null
systemctl reload nginx systemctl reload nginx
msg_ok "Nginx Server created" msg_ok "Nginx Server created"
@@ -151,12 +141,9 @@ mkdir -p /var/www/html
usermod -d /var/www/html ftp usermod -d /var/www/html ftp
usermod -d /var/www/html ftpuser usermod -d /var/www/html ftpuser
chown -R ftpuser:ftpuser /var/www/html chown -R ftpuser:ftpuser /var/www/html
sed -i "s|#write_enable=YES|write_enable=YES|g" /etc/vsftpd.conf sed -i "s|#write_enable=YES|write_enable=YES|g" /etc/vsftpd.conf
sed -i "s|#chroot_local_user=YES|chroot_local_user=NO|g" /etc/vsftpd.conf sed -i "s|#chroot_local_user=YES|chroot_local_user=NO|g" /etc/vsftpd.conf
systemctl restart -q vsftpd.service systemctl restart -q vsftpd.service
{ {
echo "FTP Credentials" echo "FTP Credentials"
echo "Username: ftpuser" echo "Username: ftpuser"
@@ -169,7 +156,6 @@ PROJECT_GUID=$(uuidgen | tr '[:upper:]' '[:lower:]')
CONTAINER_IP=$(hostname -I | awk '{print $1}') CONTAINER_IP=$(hostname -I | awk '{print $1}')
PUBLISH_PROFILE_DIR="/var/www/html/${var_project_name}/Properties/PublishProfiles" PUBLISH_PROFILE_DIR="/var/www/html/${var_project_name}/Properties/PublishProfiles"
mkdir -p "$PUBLISH_PROFILE_DIR" mkdir -p "$PUBLISH_PROFILE_DIR"
cat >"$PUBLISH_PROFILE_DIR/FTPProfile.pubxml" <<EOF cat >"$PUBLISH_PROFILE_DIR/FTPProfile.pubxml" <<EOF
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project> <Project>