mirror of
https://github.com/acedanger/shell.git
synced 2025-12-06 01:10:12 -08:00
removed web interface mention and the header text
This commit is contained in:
23
plex/plex.sh
23
plex/plex.sh
@@ -11,7 +11,6 @@
|
|||||||
#
|
#
|
||||||
# Features:
|
# Features:
|
||||||
# - Service start/stop/restart/status operations
|
# - Service start/stop/restart/status operations
|
||||||
# - Web interface launcher
|
|
||||||
# - Styled console output with Unicode symbols
|
# - Styled console output with Unicode symbols
|
||||||
# - Service health monitoring
|
# - Service health monitoring
|
||||||
# - Process management and monitoring
|
# - Process management and monitoring
|
||||||
@@ -29,7 +28,6 @@
|
|||||||
# ./plex.sh stop # Stop Plex service
|
# ./plex.sh stop # Stop Plex service
|
||||||
# ./plex.sh restart # Restart Plex service
|
# ./plex.sh restart # Restart Plex service
|
||||||
# ./plex.sh status # Show service status
|
# ./plex.sh status # Show service status
|
||||||
# ./plex.sh web # Open web interface
|
|
||||||
# ./plex.sh # Interactive menu
|
# ./plex.sh # Interactive menu
|
||||||
#
|
#
|
||||||
# Dependencies:
|
# Dependencies:
|
||||||
@@ -46,7 +44,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# 🎬 Plex Media Server Management Script
|
# 🎬 Plex Media Server Management Script
|
||||||
# A sexy, modern script for managing Plex Media Server with style
|
# A modern script for managing Plex Media Server with style
|
||||||
# Author: acedanger
|
# Author: acedanger
|
||||||
# Version: 2.0
|
# Version: 2.0
|
||||||
|
|
||||||
@@ -81,13 +79,6 @@ readonly INFO="[i]"
|
|||||||
readonly HOURGLASS="[*]"
|
readonly HOURGLASS="[*]"
|
||||||
readonly SPARKLES="[*]"
|
readonly SPARKLES="[*]"
|
||||||
|
|
||||||
# 📊 Function to print fancy headers
|
|
||||||
print_header() {
|
|
||||||
echo -e "\n${PURPLE}${BOLD}+==============================================================+${RESET}"
|
|
||||||
echo -e "${PURPLE}${BOLD}| [*] PLEX MEDIA SERVER [*] |${RESET}"
|
|
||||||
echo -e "${PURPLE}${BOLD}+==============================================================+${RESET}\n"
|
|
||||||
}
|
|
||||||
|
|
||||||
# 🎉 Function to print completion footer
|
# 🎉 Function to print completion footer
|
||||||
print_footer() {
|
print_footer() {
|
||||||
echo -e "\n${DIM}${CYAN}--- Operation completed [*] ---${RESET}\n"
|
echo -e "\n${DIM}${CYAN}--- Operation completed [*] ---${RESET}\n"
|
||||||
@@ -440,7 +431,7 @@ show_detailed_status() {
|
|||||||
service_status=$(systemctl is-active "$PLEX_SERVICE" 2>/dev/null || echo "inactive")
|
service_status=$(systemctl is-active "$PLEX_SERVICE" 2>/dev/null || echo "inactive")
|
||||||
|
|
||||||
echo -e "\n${BOLD}${BLUE}+==============================================================+${RESET}"
|
echo -e "\n${BOLD}${BLUE}+==============================================================+${RESET}"
|
||||||
echo -e "${BOLD}${BLUE}| SERVICE STATUS |${RESET}"
|
echo -e "${BOLD}${BLUE} SERVICE STATUS${RESET}"
|
||||||
echo -e "${BOLD}${BLUE}+==============================================================+${RESET}"
|
echo -e "${BOLD}${BLUE}+==============================================================+${RESET}"
|
||||||
|
|
||||||
case "$service_status" in
|
case "$service_status" in
|
||||||
@@ -523,7 +514,6 @@ show_help() {
|
|||||||
|
|
||||||
# Nuclear database recovery function
|
# Nuclear database recovery function
|
||||||
nuclear_recovery() {
|
nuclear_recovery() {
|
||||||
print_header
|
|
||||||
print_status "${INFO}" "Starting nuclear database recovery..." "${RED}"
|
print_status "${INFO}" "Starting nuclear database recovery..." "${RED}"
|
||||||
|
|
||||||
local nuclear_script="${SCRIPT_DIR}/nuclear-plex-recovery.sh"
|
local nuclear_script="${SCRIPT_DIR}/nuclear-plex-recovery.sh"
|
||||||
@@ -577,7 +567,6 @@ nuclear_recovery() {
|
|||||||
|
|
||||||
# Database repair function
|
# Database repair function
|
||||||
repair_plex() {
|
repair_plex() {
|
||||||
print_header
|
|
||||||
print_status "${INFO}" "Starting Plex database repair..." "${YELLOW}"
|
print_status "${INFO}" "Starting Plex database repair..." "${YELLOW}"
|
||||||
|
|
||||||
# Run the enhanced repair function
|
# Run the enhanced repair function
|
||||||
@@ -625,23 +614,16 @@ repair_plex() {
|
|||||||
main() {
|
main() {
|
||||||
# Check if running as root
|
# Check if running as root
|
||||||
if [[ $EUID -eq 0 ]]; then
|
if [[ $EUID -eq 0 ]]; then
|
||||||
print_header
|
|
||||||
print_status "${CROSS}" "Don't run this script as root! Use your regular user account." "${RED}"
|
print_status "${CROSS}" "Don't run this script as root! Use your regular user account." "${RED}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if no arguments provided
|
# Check if no arguments provided
|
||||||
if [[ $# -eq 0 ]]; then
|
if [[ $# -eq 0 ]]; then
|
||||||
print_header
|
|
||||||
show_help
|
show_help
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Show header for all operations except help
|
|
||||||
if [[ "${1,,}" != "help" ]] && [[ "${1,,}" != "--help" ]] && [[ "${1,,}" != "-h" ]]; then
|
|
||||||
print_header
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "${1,,}" in # Convert to lowercase
|
case "${1,,}" in # Convert to lowercase
|
||||||
"start")
|
"start")
|
||||||
start_plex
|
start_plex
|
||||||
@@ -662,7 +644,6 @@ main() {
|
|||||||
nuclear_recovery
|
nuclear_recovery
|
||||||
;;
|
;;
|
||||||
"help"|"--help"|"-h")
|
"help"|"--help"|"-h")
|
||||||
print_header
|
|
||||||
show_help
|
show_help
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
Reference in New Issue
Block a user