===== upgrade directadmin for centos,debian on tangmo 31mar2022
CHANNEL=current
OS_SLUG=linux_amd64
COMMIT=$(dig +short -t txt "$CHANNEL-version.directadmin.com" | sed 's|.*commit=\([0-9a-f]*\).*|\1|')
FILE="directadmin_${COMMIT}_${OS_SLUG}.tar.gz"
curl --location --progress-bar --connect-timeout 10 "
https://download.directadmin.com/${FILE}" --output "/root/${FILE}"
tar xzf "/root/${FILE}" -C /usr/local/directadmin
/usr/local/directadmin/directadmin p || true
/usr/local/directadmin/scripts/update.sh
echo 'action=directadmin&value=restart' >> /usr/local/directadmin/data/task.queue
สุดท้าย restart da 1 รอบ
systemctl restart directadmin
แล้วลองเทสเข้า login da อีกที
###for FreeBSD plan for dhamma.packetlove.com 17mar2022
#downloads given directadmin build into /root dir
FILE="directadmin_a3e4091814582ab3c0fecea62ff5c1f956e023da_freebsd_amd64.tar.gz"
curl --location --progress-bar --connect-timeout 10 "
https://download.directadmin.com/directadmin_a759259a6deeeb3977de8dc4387d275a9de8eaad_freebsd_amd64.tar.gz" --output "/root/directadmin_a759259a6deeeb3977de8dc4387d275a9de8eaad_freebsd_amd64.tar.gz"
#extracts downloaded package to /usr/local/directadmin
tar xzf "/root/directadmin_a759259a6deeeb3977de8dc4387d275a9de8eaad_freebsd_amd64.tar.gz" -C /usr/local/directadmin
#runs post-upgrade permission fix step
/usr/local/directadmin/directadmin permissions || true
# runs other post upgrade fixes
/usr/local/directadmin/scripts/update.sh
# restarts directadmin
แล้วลองเทสเข้า login da อีกที
service directadmin restart