Merge pull request #1160 from michielryvers/snapper-existing-configs

Don't hardcode snapper configs, read the config list first
This commit is contained in:
Ryan Hughes
2025-08-28 12:12:15 +03:00
committed by GitHub
2 changed files with 15 additions and 1 deletions

10
migrations/1756153445.sh Normal file
View File

@@ -0,0 +1,10 @@
echo "Checking and correcting Snapper configs if needed"
if command -v snapper &>/dev/null; then
if ! sudo snapper list-configs 2>/dev/null | grep -q "root"; then
sudo snapper -c root create-config /
fi
if ! sudo snapper list-configs 2>/dev/null | grep -q "home"; then
sudo snapper -c home create-config /home
fi
fi