Skip to content

Instantly share code, notes, and snippets.

@mdeguzis
Last active December 15, 2016 14:26
Show Gist options
  • Save mdeguzis/5c8dff20378c04bf5bb3 to your computer and use it in GitHub Desktop.
Save mdeguzis/5c8dff20378c04bf5bb3 to your computer and use it in GitHub Desktop.
/usr/bin/steamos-update
desktop@steamos:~$ cat /usr/bin/steamos-update
#! /bin/sh
echo $$ > /tmp/steamos-update.pid
apt-get update -y -q
unattended-upgrade
# workaround for early images which didn't have nvidia-vdpau-driver:i386 preinstalled
if [ ! -f /usr/lib/i386-linux-gnu/vdpau/libvdpau_nvidia.so.1 ] ; then
apt-get -y install nvidia-vdpau-driver:i386
fi
# workaround for early images which didn't have i965-va-driver:i386 preinstalled
if [ ! -f /usr/lib/i386-linux-gnu/dri/i965_drv_video.so ] ; then
apt-get -y install i965-va-driver:i386
fi
# signal steam to refresh its inbox if we need a reboot
if [ -f /var/run/reboot-required ] && [ "`pidof -s steam`" != '' ] ; then
STEAMPID=`pidof -s steam`
STEAMUSER=`ps -p $STEAMPID -o user=`
su $STEAMUSER -c steam steam://refreshinbox
fi
rm /tmp/steamos-update.pid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment