mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-08 16:59:17 +00:00
Compare commits
6 Commits
6a63f736de
...
5423247af6
Author | SHA1 | Date | |
---|---|---|---|
|
5423247af6 | ||
|
fb04feafb1 | ||
|
4d456dd401 | ||
|
2a053a5fef | ||
|
7cafb8713e | ||
|
ed3acb0d4f |
@ -12,7 +12,7 @@ var_cpu="1"
|
||||
var_ram="1024"
|
||||
var_disk="8"
|
||||
var_os="ubuntu"
|
||||
var_version="22.04"
|
||||
var_version="24.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}"
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
# 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
|
||||
@ -11,14 +10,18 @@ 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
|
||||
$STD apt-get install -y \
|
||||
dotnet-sdk-9.0 \
|
||||
vsftpd \
|
||||
nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Configure Application"
|
||||
@ -28,9 +31,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
|
||||
usermod --password $(echo Strong-Pass-1234 | openssl passwd -1 -stdin) 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
|
||||
mkdir -p /var/www/html
|
||||
usermod -d /var/www/html ftp
|
||||
usermod -d /var/www/html ftpuser
|
||||
@ -40,11 +43,16 @@ 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
|
||||
@ -67,7 +75,7 @@ server {
|
||||
}
|
||||
}
|
||||
EOF
|
||||
systemctl restart -q nginx
|
||||
systemctl reload nginx
|
||||
msg_ok "Nginx Server Created"
|
||||
|
||||
msg_info "Creating Service"
|
||||
@ -90,8 +98,7 @@ Environment=DOTNET_NOLOGO=true
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q kestrel-$var_project_name.service
|
||||
systemctl start -q kestrel-$var_project_name.service
|
||||
systemctl enable -q --now kestrel-$var_project_name.service
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
@ -100,4 +107,4 @@ customize
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
msg_ok "Cleaned"
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name":"Dotnet ASP Web API",
|
||||
"slug":"dotnetaspwebapi",
|
||||
"categories":[
|
||||
5
|
||||
0
|
||||
],
|
||||
"date_created":"2025-01-15",
|
||||
"type":"ct",
|
||||
@ -22,7 +22,7 @@
|
||||
"ram":1024,
|
||||
"hdd":8,
|
||||
"os":"Ubuntu",
|
||||
"version":"22.04"
|
||||
"version":"24.04"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -32,8 +32,8 @@
|
||||
},
|
||||
"notes":[
|
||||
{
|
||||
"text":"FTP server credentials: ftpuser (user) Strong-Pass-1234 (password)",
|
||||
"text":"FTP server credentials: `cat ~/ftp.creds`",
|
||||
"type":"info"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user