Skip to content

Instantly share code, notes, and snippets.

hrpatel hrpatel

  • Canada
Block or report user

Report or block hrpatel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hrpatel
hrpatel / disable_apt_daily.sh
Created Dec 17, 2018
Disable service that updates apt packages daily
View disable_apt_daily.sh
systemctl disable apt-daily.service
systemctl mask apt-daily.service
systemctl disable apt-daily-upgrade.service
systemctl mask apt-daily-upgrade.service
@hrpatel
hrpatel / disable_apt_periodic.sh
Created Dec 17, 2018
Disable periodic activities of apt
View disable_apt_periodic.sh
#!/bin/bash
cat <<EOF >/etc/apt/apt.conf.d/10disable-periodic
APT::Periodic::Enable "0";
EOF
# Do some stuff with apt/dpkg at boot
@hrpatel
hrpatel / wait_for_apt_deb.sh
Created Dec 17, 2018
Wait for apt/dpkg to finish
View wait_for_apt_deb.sh
timeout=10
function wait_for_apt_deb {
while sudo fuser /var/{lib/{dpkg,apt/lists},cache/apt/archives}/lock &>/dev/null 2>&1; do
echo "Waiting for apt/dpkg lock to release, sleeping ${timeout}s"
sleep "${timeout}"
done
}
wait_for_deb && apt-get install vim
You can’t perform that action at this time.