Update remove_hyperion.sh
This commit is contained in:
parent
e6257e08a2
commit
d2231c0cd4
|
@ -19,7 +19,7 @@ fi
|
|||
|
||||
#Welcome message
|
||||
echo '*******************************************************************************'
|
||||
echo 'This script will remove Hyperion and it´s services'
|
||||
echo 'This script will remove Hyperion and it´s services'
|
||||
echo '-----> Please BACKUP your hyperion.config.json if necessary <-----'
|
||||
echo 'Created by brindosch - hyperion-project.org - the official Hyperion source.'
|
||||
echo '*******************************************************************************'
|
||||
|
@ -29,7 +29,7 @@ if [ "$1" = "" ]; then
|
|||
#Prompt for confirmation to proceed
|
||||
while true
|
||||
do
|
||||
echo -n "---> Do you really want to remove Hyperion and it´s services? (y or n) :"
|
||||
echo -n "---> Do you really want to remove Hyperion and it´s services? (y or n) :"
|
||||
read CONFIRM
|
||||
case $CONFIRM in
|
||||
y|Y|YES|yes|Yes) break ;;
|
||||
|
@ -58,23 +58,16 @@ SERVICEC=1
|
|||
echo '---> Stop Hyperion, if necessary'
|
||||
if [ $OS_OPENELEC -eq 1 ]; then
|
||||
killall hyperiond 2>/dev/null
|
||||
elif [ $USE_SYSTEMD -eq 1 ]; then
|
||||
systemctl stop hyperion 2>/dev/null
|
||||
elif [ $USE_INITCTL -eq 1 ]; then
|
||||
/sbin/initctl stop hyperion 2>/dev/null
|
||||
elif [ $USE_SERVICE -eq 1 ]; then
|
||||
/usr/sbin/service hyperion stop 2>/dev/null
|
||||
elif [ $USE_SYSTEMD -eq 1 ]; then
|
||||
service hyperion stop 2>/dev/null
|
||||
fi
|
||||
|
||||
#reset count
|
||||
SERVICEC=`which /usr/sbin/service | wc -l`
|
||||
|
||||
#Disabling and delete service files
|
||||
if [ $USE_INITCTL -eq 1 ]; then
|
||||
echo '---> Delete and disable Hyperion initctl script'
|
||||
rm -v /etc/init/hyperion* 2>/dev/null
|
||||
initctl reload-configuration
|
||||
elif [ $OS_OPENELEC -eq 1 ]; then
|
||||
if [ $OS_OPENELEC -eq 1 ]; then
|
||||
# Remove Hyperion from OpenELEC autostart.sh
|
||||
echo "---> Remove Hyperion from OpenELEC autostart.sh"
|
||||
sed -i "/hyperiond/d" /storage/.config/autostart.sh 2>/dev/null
|
||||
|
@ -84,6 +77,10 @@ elif [ $USE_SYSTEMD -eq 1 ]; then
|
|||
echo '---> Delete and disable Hyperion systemd script'
|
||||
systemctl disable hyperion.service
|
||||
rm -v /etc/systemd/system/hyperion* 2>/dev/null
|
||||
elif [ $USE_INITCTL -eq 1 ]; then
|
||||
echo '---> Delete and disable Hyperion initctl script'
|
||||
rm -v /etc/init/hyperion* 2>/dev/null
|
||||
initctl reload-configuration
|
||||
elif [ $USE_SERVICE -eq 1 ]; then
|
||||
# Delete and disable Hyperion init.d script
|
||||
echo '---> Delete and disable Hyperion init.d script'
|
||||
|
@ -116,4 +113,4 @@ echo '**************************************************************************
|
|||
echo 'Hyperion successful removed!'
|
||||
echo '*******************************************************************************'
|
||||
exit 0
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue