mirror of
https://github.com/acedanger/shell.git
synced 2025-12-06 04:30:13 -08:00
fix: improve error handling for plexmediaserver.service checks and add Oh My Zsh upgrade script execution
This commit is contained in:
13
update.sh
13
update.sh
@@ -1,15 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# checks if the plexmediaserver.service is defined on this machine. stop it if it is.
|
# checks if the plexmediaserver.service is defined on this machine. stop it if it is.
|
||||||
if systemctl is-active --quiet plexmediaserver.service; then
|
if systemctl is-active --quiet plexmediaserver.service 2>/dev/null; then
|
||||||
sudo /home/acedanger/shell/plex.sh stop
|
sudo /home/acedanger/shell/plex.sh stop
|
||||||
fi
|
fi
|
||||||
|
|
||||||
omz update
|
omz_upgrade_script=~/.oh-my-zsh/tools/upgrade.sh
|
||||||
|
|
||||||
|
# Check if the script exists and is executable
|
||||||
|
if [ -x "$omz_upgrade_script" ]; then
|
||||||
|
echo "Attempting Oh My Zsh upgrade..."
|
||||||
|
"$omz_upgrade_script"
|
||||||
|
fi
|
||||||
|
|
||||||
sudo nala update
|
sudo nala update
|
||||||
sudo nala upgrade -y
|
sudo nala upgrade -y
|
||||||
|
|
||||||
# checks if the plexmediaserver.service is defined on this machine. start it if it is.
|
# checks if the plexmediaserver.service is defined on this machine. start it if it is.
|
||||||
if systemctl is-enabled --quiet plexmediaserver.service; then
|
if systemctl is-enabled --quiet plexmediaserver.service 2>/dev/null; then
|
||||||
sudo /home/acedanger/shell/plex.sh start
|
sudo /home/acedanger/shell/plex.sh start
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user