Skip to content

Instantly share code, notes, and snippets.

@ecarreras
Last active December 11, 2015 17:09
Show Gist options
  • Select an option

  • Save ecarreras/4632892 to your computer and use it in GitHub Desktop.

Select an option

Save ecarreras/4632892 to your computer and use it in GitHub Desktop.
Install/Upgrade packages without (re)starting services in Debian/Ubuntu
#!/bin/bash
FAKE_ROOT=/root/fake
mkdir -p $FAKE_ROOT
pushd $FAKE_ROOT &>/dev/null
for x in initctl invoke-rc.d restart start stop start-stop-daemon service; do
if [ ! -e $x ]; then
echo "Linking $x to /bin/true."
ln -s /bin/true $x; fi; done
popd &>/dev/null
PATH=$FAKE_ROOT:$PATH $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment