diff --git a/update.sh b/update.sh index 2e6e76c..94d6443 100755 --- a/update.sh +++ b/update.sh @@ -1,15 +1,22 @@ #!/bin/bash # 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 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 upgrade -y # 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 fi