fix: update pacman.conf Server URL on re-install (was stuck on localhost)
This commit is contained in:
+3
-1
@@ -40,7 +40,9 @@ Server = http://$SHIELD_HOST:$SHIELD_PORT/repo
|
|||||||
SigLevel = Never"
|
SigLevel = Never"
|
||||||
|
|
||||||
if grep -q "^\[aur-shield\]" "$PACMAN_CONF"; then
|
if grep -q "^\[aur-shield\]" "$PACMAN_CONF"; then
|
||||||
echo "⚠ [aur-shield] already exists in $PACMAN_CONF — skipping"
|
echo "⚠ [aur-shield] already exists — updating server URL..."
|
||||||
|
sudo sed -i "/^\[aur-shield\]/,/^\[/ s|Server = .*|Server = http://$SHIELD_HOST:$SHIELD_PORT/repo|" "$PACMAN_CONF"
|
||||||
|
echo "✓ Updated repo server URL"
|
||||||
else
|
else
|
||||||
echo "Adding [aur-shield] to $PACMAN_CONF..."
|
echo "Adding [aur-shield] to $PACMAN_CONF..."
|
||||||
sudo tee -a "$PACMAN_CONF" > /dev/null << EOF
|
sudo tee -a "$PACMAN_CONF" > /dev/null << EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user