Compare commits

..

No commits in common. "5423247af6de228dd93bc6a10dfbd21f3c2c81b3" and "6a63f736de942d16189f2eb72d6934226f8758a8" have entirely different histories.

3 changed files with 18 additions and 25 deletions

View File

@ -12,7 +12,7 @@ var_cpu="1"
var_ram="1024"
var_disk="8"
var_os="ubuntu"
var_version="24.04"
var_version="22.04"
var_unprivileged="0"
# App Output & Base Settings
@ -46,4 +46,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following IP:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}${IP}:80${CL}"
echo -e "${TAB}${GATEWAY}${BGN}${IP}:80${CL}"

View File

@ -2,7 +2,8 @@
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Kristian Skov
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
color
@ -10,18 +11,14 @@ verb_ip6
catch_errors
setting_up_container
network_check
update_os
#update_os
msg_info "Installing Dependencies"
$STD apt-get update
$STD apt-get install -y \
ssh \
software-properties-common
$STD add-apt-repository -y ppa:dotnet/backports
$STD apt-get install -y \
dotnet-sdk-9.0 \
vsftpd \
nginx
$STD apt-get install -y dotnet-sdk-9.0
msg_ok "Installed Dependencies"
msg_info "Configure Application"
@ -31,9 +28,9 @@ echo "Target assembly: '${var_project_name}'"
msg_ok "Application Configured"
msg_info "Setting up FTP Server"
$STD apt-get install -y vsftpd
useradd ftpuser
FTP_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
usermod --password $(echo ${FTP_PASS} | openssl passwd -1 -stdin) ftpuser
usermod --password $(echo Strong-Pass-1234 | openssl passwd -1 -stdin) ftpuser
mkdir -p /var/www/html
usermod -d /var/www/html ftp
usermod -d /var/www/html ftpuser
@ -43,16 +40,11 @@ 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
systemctl restart -q vsftpd.service
{
echo "FTP-Credentials"
echo "Username: ftpuser"
echo "Password: $FTP_PASS"
} >> ~/ftp.creds
msg_ok "FTP server setup completed"
msg_info "Setting up Nginx Server"
$STD apt-get install -y nginx
rm -f /var/www/html/index.nginx-debian.html
sed "s/\$var_project_name/$var_project_name/g" >myfile <<'EOF' >/etc/nginx/sites-available/default
@ -75,7 +67,7 @@ server {
}
}
EOF
systemctl reload nginx
systemctl restart -q nginx
msg_ok "Nginx Server Created"
msg_info "Creating Service"
@ -98,7 +90,8 @@ Environment=DOTNET_NOLOGO=true
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now kestrel-$var_project_name.service
systemctl enable -q kestrel-$var_project_name.service
systemctl start -q kestrel-$var_project_name.service
msg_ok "Created Service"
motd_ssh
@ -107,4 +100,4 @@ customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"
msg_ok "Cleaned"

View File

@ -2,7 +2,7 @@
"name":"Dotnet ASP Web API",
"slug":"dotnetaspwebapi",
"categories":[
0
5
],
"date_created":"2025-01-15",
"type":"ct",
@ -22,7 +22,7 @@
"ram":1024,
"hdd":8,
"os":"Ubuntu",
"version":"24.04"
"version":"22.04"
}
}
],
@ -32,8 +32,8 @@
},
"notes":[
{
"text":"FTP server credentials: `cat ~/ftp.creds`",
"text":"FTP server credentials: ftpuser (user) Strong-Pass-1234 (password)",
"type":"info"
}
]
}
}