1 | ||
1 | ||
1 | ||
1 |
#!/usr/bin/env bash
if [ -z "$TMUX" ]; then
printf >&2 "✗ pacman must be run inside tmux\n"
exit 1
fi
exec /usr/bin/pacman "$@"
Now that I've begun migrating away from ubuntu for servers and am now using Arch/Artix for server I'm going to be using pacman more over ssh.
It is very easy to break a system if pacman gets interrupted. To fix it usually you need to chroot from an instillation disk to patch the kernel and initramfs.
That's not always easy to do on cheap VPS's. Plus even if it was easy the down time on a server is unacceptable anyway.
I theory this is a good thing to be doing with apt as well. Pacman just breaks a system more frequently when interupted than apt does. Maybe it's just because Arch/Artix is constantly updating the kernel to the lastest because it's cool like that. On Arch you only run new software. It leads to less version hell when there is less field of time to consider.
But to use this with apt, which is not a bad idea, just swap the command.
Arch for servers... Don't you think that's a bit insane? Like, on a server you don't even want to be updating all the time, but Arch forces you to and if you update after a long time it stops functioning. It doesn't even promise to remain functional if you use it normally, you should expect things to break. I'm sure you have your reasoning but why use Arch over Gentoo for this purpose?