clean up aur helper for rsync command and pacman repos
This commit is contained in:
parent
1c9b1cf905
commit
5d35c9ea0c
2 changed files with 10 additions and 8 deletions
|
@ -23,11 +23,11 @@ cp hooks/2.archive_packages-client.hook /etc/pacman.d/hooks/2.archive_packages.h
|
||||||
cp scripts/archive_packages.sh /root/
|
cp scripts/archive_packages.sh /root/
|
||||||
chmod +x /root/archive_packages.sh
|
chmod +x /root/archive_packages.sh
|
||||||
|
|
||||||
if AURHELPER=$(pacman -Qmq | grep -E 'yay|pikaur|paru|trizen') ; then
|
if aurhelper=$(pacman -Qmq | grep -E 'yay|pikaur|paru|trizen') ; then
|
||||||
echo "Set $AURHELPER rsync command to archive_packages.sh script.">&2
|
echo "Set $aurhelper rsync command to archive_packages.sh script."
|
||||||
echo "rsync -chavzP --password-file=/etc/rsyncd.password --ignore-existing /home/$real_user/.cache/$aurhelper/pkg/* rsync://\$user@\$server/archiverepo/archlinux/\$arch/aur" >> /root/archive_packages.sh
|
echo "rsync -chavzP --password-file=/etc/rsyncd.password --ignore-existing /home/$real_user/.cache/$aurhelper/pkg/* rsync://\$user@\$server/archiverepo/archlinux/\$arch/aur" >> /root/archive_packages.sh
|
||||||
else
|
else
|
||||||
echo "No AUR helper installed.">&2
|
echo "No AUR helper installed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Rsync credentials
|
# Rsync credentials
|
||||||
|
@ -38,11 +38,12 @@ chmod 400 /etc/rsyncd.user /etc/rsyncd.password /etc/rsyncd.server
|
||||||
|
|
||||||
# Add repository to pacman.conf
|
# Add repository to pacman.conf
|
||||||
if AURHELPER=$(pacman -Qmq | grep -E 'yay|pikaur|paru|trizen') ; then
|
if AURHELPER=$(pacman -Qmq | grep -E 'yay|pikaur|paru|trizen') ; then
|
||||||
|
echo "Add $aurhelper AUR helper to pacmans repos."
|
||||||
echo "[homerepo-aur]
|
echo "[homerepo-aur]
|
||||||
Server = http://$server:8080/archlinux/\$arch/aur
|
Server = http://$server:8080/archlinux/\$arch/aur
|
||||||
SigLevel = Never" >> /etc/pacman.conf
|
SigLevel = Never" >> /etc/pacman.conf
|
||||||
else
|
else
|
||||||
echo "No AUR helper installed.">&2
|
echo "No AUR helper installed."
|
||||||
fi
|
fi
|
||||||
echo "[homerepo]
|
echo "[homerepo]
|
||||||
Server = http://$server:8080/archlinux/\$arch" >> /etc/pacman.conf
|
Server = http://$server:8080/archlinux/\$arch" >> /etc/pacman.conf
|
|
@ -60,12 +60,13 @@ secrets file = /etc/rsyncd.secrets
|
||||||
systemctl enable --now rsyncd.service
|
systemctl enable --now rsyncd.service
|
||||||
|
|
||||||
# Add repository to pacman.conf
|
# Add repository to pacman.conf
|
||||||
if AURHELPER=$(pacman -Qmq | grep -E 'yay|pikaur|paru|trizen') ; then
|
if aurhelper=$(pacman -Qmq | grep -E 'yay|pikaur|paru|trizen') ; then
|
||||||
|
echo "Add $aurhelper AUR helper to pacmans repos."
|
||||||
echo "[homerepo-aur]
|
echo "[homerepo-aur]
|
||||||
Server = http://$server:8080/archlinux/\$arch/aur
|
Server = http://$server:8080/archlinux/\$arch/aur
|
||||||
SigLevel = Never" >> /etc/pacman.conf
|
SigLevel = Never" >> /etc/pacman.conf
|
||||||
else
|
else
|
||||||
echo "No AUR helper installed.">&2
|
echo "No AUR helper installed."
|
||||||
fi
|
fi
|
||||||
echo "[homerepo]
|
echo "[homerepo]
|
||||||
Server = http://$server:8080/archlinux/\$arch" >> /etc/pacman.conf
|
Server = http://$server:8080/archlinux/\$arch" >> /etc/pacman.conf
|
Loading…
Reference in a new issue