Files
shell/update.sh

23 lines
668 B
Bash
Executable File

#!/bin/bash
# checks if the plexmediaserver.service is defined on this machine. stop it if it is.
if systemctl is-active --quiet plexmediaserver.service 2>/dev/null; then
sudo /home/acedanger/shell/plex.sh stop
fi
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 2>/dev/null; then
sudo /home/acedanger/shell/plex.sh start
fi