defaults
This commit is contained in:
13
defaults.inc
Executable file
13
defaults.inc
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS='1.01232022'
|
||||
|
||||
|
||||
declare -A NM_SERVICES
|
||||
NM_SERVICES['lidarr']='Lidarr (Music Manager)'
|
||||
NM_SERVICES['radarr']='Radarr (Movie Manager)'
|
||||
NM_SERVICES['sonarr']='Sonarr (TV Show Manager)'
|
||||
NM_SERVICES['jackett']='Jackett (Torrent Indexing Manager)'
|
||||
NM_SERVICES['qbittorrent']='qBittorrent (Torrent Downloader)'
|
||||
NM_SERVICES['snap.tautulli.tautulli']='Tautulli (Plex Stats)'
|
||||
NM_SERVICES['ombi']='Ombi (Download Requester)'
|
||||
@@ -7,6 +7,7 @@ action="$1"
|
||||
source /opt/idssys/defaults/colors.inc
|
||||
source /opt/idssys/defaults/default.inc
|
||||
source /opt/idssys/settings/mediamanager.conf
|
||||
source /opt/idssys/mediamanager/defaults.inc
|
||||
|
||||
|
||||
IFS=,
|
||||
@@ -70,6 +71,23 @@ MMSTOP(){
|
||||
echo -e "${idsCL[Red]}All services have been stopped${idsCL[Default]}"
|
||||
}
|
||||
|
||||
MMSTATUS(){
|
||||
for srvc in "${SERVICES_CHECK[@]}"; do
|
||||
c=0; cw=22; spc=''
|
||||
spc1=${cw}-${#NM_SERVICES[${srvc}]}
|
||||
until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
|
||||
echo -en " ${NM_SERVICES[${srvc}]}$spc: "
|
||||
|
||||
if [ "$(systemctl is-active ${srvc})" != "active" ]; then
|
||||
echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
|
||||
else
|
||||
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
|
||||
case $action in
|
||||
start | check)
|
||||
|
||||
Reference in New Issue
Block a user