mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 04:49:34 -07:00
AUTOSTART [-s] cleanup
Changed AUTOSTART to [-s], which makes more sense. Added RedHat/CentOS warning to suggest using -s Cleaned AUTOSTART segment and added a warning when this option is being used but may not be needed.
This commit is contained in:
parent
6f8980ba70
commit
32b53de62a
1 changed files with 7 additions and 7 deletions
|
@ -89,7 +89,7 @@ do
|
||||||
(-p) PUBLIC=yes;;
|
(-p) PUBLIC=yes;;
|
||||||
(-u) AUTOUPDATE=yes;;
|
(-u) AUTOUPDATE=yes;;
|
||||||
(-U) AUTOUPDATE=no;;
|
(-U) AUTOUPDATE=no;;
|
||||||
(-r) AUTOSTART=yes;;
|
(-s) AUTOSTART=yes;;
|
||||||
(--) ;;
|
(--) ;;
|
||||||
(-*) echo "Error: unrecognized option $1" 1>&2; exit 1;;
|
(-*) echo "Error: unrecognized option $1" 1>&2; exit 1;;
|
||||||
(*) break;;
|
(*) break;;
|
||||||
|
@ -263,6 +263,7 @@ SKIP_DOWNLOAD="no"
|
||||||
|
|
||||||
# Installed version detection (only supported for deb based systems, feel free to submit rpm equivalent)
|
# Installed version detection (only supported for deb based systems, feel free to submit rpm equivalent)
|
||||||
if [ "${REDHAT}" != "yes" ]; then
|
if [ "${REDHAT}" != "yes" ]; then
|
||||||
|
echo "Your distribution may require the use of the AUTOSTART [-s] option for the service to start after the upgrade completes."
|
||||||
INSTALLED_VERSION=$(dpkg-query -s plexmediaserver 2>/dev/null | grep -Po 'Version: \K.*')
|
INSTALLED_VERSION=$(dpkg-query -s plexmediaserver 2>/dev/null | grep -Po 'Version: \K.*')
|
||||||
else
|
else
|
||||||
INSTALLED_VERSION=$(rpm -qv plexmediaserver 2>/dev/null)
|
INSTALLED_VERSION=$(rpm -qv plexmediaserver 2>/dev/null)
|
||||||
|
@ -299,7 +300,7 @@ if [ "${AUTOINSTALL}" == "yes" ]; then
|
||||||
if [ "${REDHAT}" == "yes" ]; then
|
if [ "${REDHAT}" == "yes" ]; then
|
||||||
sudo yum -y install "${DOWNLOADDIR}/${FILENAME}"
|
sudo yum -y install "${DOWNLOADDIR}/${FILENAME}"
|
||||||
else
|
else
|
||||||
sudo dpkg -i "${DOWNLOADDIR}/${FILENAME}"
|
sudo dpkg -i "${DOWNLOADDIR}/${FILENAME}" if [ "${AUTOINSTALL}" == "yes" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -313,12 +314,11 @@ if [ "${AUTODELETE}" == "yes" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${AUTOSTART}" == "yes" ]; then
|
if [ "${AUTOSTART}" == "yes" ]; then
|
||||||
if [ "${AUTOSTART}" == "yes" ]; then
|
if [ "${REDHAT}" == "no" ]; if [ "${AUTOINSTALL}" == "yes" ]; then
|
||||||
service plexmediaserver start
|
then
|
||||||
else
|
echo "The AUTOSTART [-s] option may not be needed on your distribution."
|
||||||
echo "Will not attempt to auto start plexmediaserver service without [-r] restart"
|
|
||||||
fi
|
fi
|
||||||
|
service plexmediaserver start
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $REDHAT
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue