disable and remove expand-rootfs service if it exits cleanly

This commit is contained in:
Pratham Patel 2024-01-03 12:28:41 +05:30
parent be186d5975
commit 1b43c55679
No known key found for this signature in database

View File

@ -18,5 +18,12 @@ else
exit 1 exit 1
fi fi
growpart "${PARENT_ROOT_DEVICE}" "${ROOT_PARTITION}" growpart "${PARENT_ROOT_DEVICE}" "${ROOT_PARTITION}" && GP_OK='true'
resize2fs "${ROOT_DEVICE}" resize2fs "${ROOT_DEVICE}" && RESIZE_OK='true'
if [[ "${GP_OK}" == 'true' && "${RESIZE_OK}" == 'true' ]]; then
systemctl disable expand-rootfs.service
rm /etc/systemd/system/expand-rootfs.service
systemctl daemon-reload
rm /usr/local/bin/expand-rootfs.sh
fi