Files
Misc-Scripts/install-mediamanager.sh

66 lines
1.8 KiB
Bash
Executable File

#!/usr/bin/env bash
# Wrapper script for install, for easier execution via URL.
if [ -d /opt/idssys/defaults ]; then
source /opt/idssys/defaults/colors.inc
source /opt/idssys/defaults/default.inc
else
source /dev/stdin <<< "$(curl -sL http://go.scity.us/colorsinc)"
source /dev/stdin <<< "$(curl -sL http://go.scity.us/defaultinc)"
fi
echo ""
echo -e "${idsCL[LightGreen]}MediaManager Installation Script${idsCL[Default]}"
do_with_root $APTFUNC -y install wget curl git jq wireguard
do_with_root set -eu
do_with_root git clone https://git.schroedercity.com/voltron/mediamanager.git /opt/idssys/mediamanager
# do_with_root git clone -b dev https://git.schroedercity.com/voltron/mediamanager.git /opt/idssys/mediamanager
do_with_root ln -s /opt/idssys/mediamanager/run.sh /usr/local/bin/mm
if [ ! -d "/opt/idssys/defaults" ]; then
do_with_root set -eu
do_with_root git clone https://git.schroedercity.com/voltron/iDS-Defaults.git /opt/idssys/defaults
fi
if [ ! -d "/opt/idssys/settings" ]; then
do_with_root mkdir /opt/idssys/settings
fi
echo -e "VPN_INTERFACE=wg-torguard
SERVICESCHECK=jackett,qbittorrent,sonarr,radarr,snap.tautulli.tautulli,ombi,bazarr
#(will not start services if the file /path/to/plex-media/mounted does not exist)
PLEX_MOUNT=/path/to/plex-media
#(optional)
# EMAIL_NOTICE=email@address.com
# PUSHOVER_APP_TOKEN=""
# PUSHOVER_USER_TOKEN=""
#Torguard VPN Settings
VPN_SERVER=chi.central.usa.torguardvpnaccess.com
VPN_USER=
VPN_PASS=
" > /opt/idssys/mediamanager/settings.conf
echo -e "/opt/idssys/mediamanager/logfile {
weekly
rotate 4
}
" > /etc/logrotate.d/mm-logfile.conf
do_with_root mkdir /opt/idssys/mediamanager/logs
echo ""
echo -e "${idsCL[Yellow]}MediaManager has been Installed${idsCL[Default]}"
echo ""
echo -e "To run, use the command: ${idsCL[Green]}mm${idsCL[Default]}"
echo ""
echo ""
exit 0