# Shell Scripts and Dotfiles Repository This repository contains various shell scripts for managing media-related tasks and dotfiles for system configuration. ## Available Scripts - [Backup Media Script](docs/backup-media.md): Documentation for the `backup-media.sh` script. - `plex.sh`: Script to manage the Plex Media Server (start, stop, restart, status). - `backup-plex.sh`: Script to back up Plex Media Server databases and related files. - `folder-metrics.sh`: Script to calculate disk usage and file count for a directory and its subdirectories. ## Documentation - [Plex Backup Script Documentation](./docs/plex-backup.md): Detailed documentation for the `backup-plex.sh` script. - [Plex Management Script Documentation](./docs/plex-management.md): Detailed documentation for the `plex.sh` script. - [Folder Metrics Script Documentation](./docs/folder-metrics.md): Detailed documentation for the `folder-metrics.sh` script. ## Dotfiles The repository includes dotfiles for system configuration in the `dotfiles` directory. These can be automatically set up using the bootstrap script: ```bash curl -fsSL https://raw.githubusercontent.com/acedanger/shell/main/bootstrap.sh | bash ``` For more information about the dotfiles, see [Dotfiles README](./dotfiles/README.md). # plex.sh This script is used to manage the Plex Media Server service on a systemd-based Linux distribution. It provides the following functionalities: - **start**: Starts the Plex Media Server. - **stop**: Stops the Plex Media Server. - **restart**: Restarts the Plex Media Server. - **status**: Displays the current status of the Plex Media Server. ## Usage Note that these commands will run as `root`. ```shell ./shell/plex.sh {start|stop|restart|status} ```