Use curl instead of wget

This commit is contained in:
CanbiZ
2025-03-24 12:00:56 +01:00
parent 6c199a2307
commit 9d0b930db8
36 changed files with 2074 additions and 2078 deletions

View File

@@ -40,7 +40,7 @@
- Import the build.func file.
- When developing your own script, change the URL to your own repository.
> [!IMPORTANT]
> [!IMPORTANT]
> You also need to change all apperances of this URL in `misc/build.func` and `misc/install.func`
Example for development:
@@ -95,7 +95,7 @@ Example:
>| Variable | Description | Notes |
>|----------|-------------|-------|
>| `APP` | Application name | Must match ct\AppName.sh |
>| `var_tags` | Proxmox display tags without Spaces, only ; | Limit the number |
>| `var_tags` | Proxmox display tags without Spaces, only ; | Limit the number |
>| `var_cpu` | CPU cores | Number of cores |
>| `var_ram` | RAM | In MB |
>| `var_disk` | Disk capacity | In GB |
@@ -189,7 +189,7 @@ Example with a Github Release:
Example:
```bash
wget -q
curl -fsSL
unzip -q
```
@@ -198,8 +198,8 @@ unzip -q
Example:
```bash
$STD php artisan migrate --force
$STD php artisan config:clear
$STD php artisan migrate --force
$STD php artisan config:clear
```
### 3.5 **Backups**

View File

@@ -115,7 +115,7 @@ $STD apt-get install -y \
git \
sudo \
mc \
nginx
nginx
```
### 3.2 **Collapse dependencies**
@@ -154,7 +154,7 @@ Example for a git release:
```bash
RELEASE=$(curl -fsSL https://api.github.com/repos/snipe/snipe-it/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
wget -q "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip"
curl -fsSL "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip"
```
### 5.2 **Save the version for update checks**
@@ -192,7 +192,7 @@ msg_ok "Installed Dependencies"
Example:
```bash
wget -q
curl -fsSL
unzip -q
```

View File

@@ -6,7 +6,7 @@
# Source: [SOURCE_URL]
# Import Functions und Setup
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
@@ -34,11 +34,11 @@ $STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
{
echo "${APPLICATION} Credentials"
echo "Database User: $DB_USER"
echo "Database Password: $DB_PASS"
echo "Database Name: $DB_NAME"
} >> ~/$APP_NAME.creds
echo "${APPLICATION} Credentials"
echo "Database User: $DB_USER"
echo "Database Password: $DB_PASS"
echo "Database Name: $DB_NAME"
} >>~/$APP_NAME.creds
msg_ok "Set up Database"
# Temp
@@ -46,11 +46,11 @@ msg_ok "Set up Database"
# Setup App
msg_info "Setup ${APPLICATION}"
RELEASE=$(curl -s https://api.github.com/repos/[REPO]/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
wget -q "https://github.com/[REPO]/archive/refs/tags/${RELEASE}.zip"
curl -fsSL "https://github.com/[REPO]/archive/refs/tags/${RELEASE}.zip"
unzip -q ${RELEASE}.zip
mv ${APPLICATION}-${RELEASE}/ /opt/${APPLICATION}
#
#
#
#
#
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Setup ${APPLICATION}"
@@ -80,4 +80,4 @@ msg_info "Cleaning up"
rm -f ${RELEASE}.zip
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"
msg_ok "Cleaned"