#!/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 sudo plex stop 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 sudo plex start fi