better test for package installed or not.

pull/54/head
sparklyballs 8 years ago committed by GitHub
parent fd5f6217eb
commit 7fd2f7f574

@ -5,9 +5,10 @@
cp /defaults/plexmediaserver /etc/default/plexmediaserver cp /defaults/plexmediaserver /etc/default/plexmediaserver
# test if plex is installed and try re-pulling latest if not # test if plex is installed and try re-pulling latest if not
if dpkg -s plexmediaserver > /dev/null 2>&1 ; then if (dpkg --get-selections plexmediaserver | grep -wq "install"); then
: :
else echo "for some reason plex doesn't appear to be installed, pulling a new copy and exiting out of update script" else
echo "for some reason plex doesn't appear to be installed, pulling a new copy and exiting out of update script"
curl -o /tmp/plexmediaserver.deb -L \ curl -o /tmp/plexmediaserver.deb -L \
"${PLEX_INSTALL}" && \ "${PLEX_INSTALL}" && \
dpkg -i --force-confold /tmp/plexmediaserver.deb dpkg -i --force-confold /tmp/plexmediaserver.deb

Loading…
Cancel
Save