mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Update UPDATE.sh
This commit is contained in:
parent
c18775a2b5
commit
a51b131492
@ -1,15 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Updating template: /etc/openpanel/varnish/default.vcl"
|
||||
wget -O /etc/openpanel/varnish/default.vcl https://github.com/stefanpejcic/openpanel-configuration/blob/main/varnish/default.vcl
|
||||
|
||||
for dir in /home/*; do
|
||||
file="$dir/.env"
|
||||
user=$(basename "$dir")
|
||||
|
||||
if [[ -f "$file" ]]; then
|
||||
# Check if lines already exist (loosely)
|
||||
|
||||
cp /etc/openpanel/varnish/default.vcl file="$dir/default.vcl"
|
||||
echo "- Updated Varnish default.vcl template for user: $user"
|
||||
|
||||
if ! grep -q 'CRONJOBS' "$file"; then
|
||||
sed -i '/BUSYBOX_RAM="0.1G"/a \
|
||||
# CRONJOBS\nCRON_CPU="0.1"\nCRON_RAM="0.25G"' "$file"
|
||||
echo "Updated: $file"
|
||||
|
||||
echo "- Updated $file for user: $user to add CRON limits"
|
||||
fi
|
||||
fi
|
||||
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user