Commit 46c4f471 authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Add Mayan EDMS, Electronic vault for your documents

parent 5b5d296d
...@@ -42,26 +42,33 @@ ...@@ -42,26 +42,33 @@
# install_ISPConfig # install_ISPConfig
# check_if_installed # check_if_installed
# #
# load functions, local first # load functions, local first
# #
if [[ -f debian-config-jobs ]]; then source debian-config-jobs; if [[ -f debian-config-jobs ]]; then source debian-config-jobs;
elif [[ -f /usr/lib/armbian-config/jobs.sh ]]; then source /usr/lib/armbian-config/jobs.sh; elif [[ -f /usr/lib/armbian-config/jobs.sh ]]; then \
source /usr/lib/armbian-config/jobs.sh;
else exit 1; else exit 1;
fi fi
if [[ -f debian-config-submenu ]]; then source debian-config-submenu; if [[ -f debian-config-submenu ]]; then source debian-config-submenu;
elif [[ -f /usr/lib/armbian-config/submenu.sh ]]; then source /usr/lib/armbian-config/submenu.sh; elif [[ -f /usr/lib/armbian-config/submenu.sh ]]; then \
source /usr/lib/armbian-config/submenu.sh;
else exit 1; else exit 1;
fi fi
if [[ -f debian-config-functions ]]; then source debian-config-functions; if [[ -f debian-config-functions ]]; then source debian-config-functions;
elif [[ -f /usr/lib/armbian-config/functions.sh ]]; then source /usr/lib/armbian-config/functions.sh; elif [[ -f /usr/lib/armbian-config/functions.sh ]]; then \
source /usr/lib/armbian-config/functions.sh;
else exit 1; else exit 1;
fi fi
if [[ -f debian-config-functions-network ]]; then source debian-config-functions-network; if [[ -f debian-config-functions-network ]]; then source debian-config-functions-network;
elif [[ -f /usr/lib/armbian-config/functions-network.sh ]]; then source /usr/lib/armbian-config/functions-network.sh; elif [[ -f /usr/lib/armbian-config/functions-network.sh ]]; then \
source /usr/lib/armbian-config/functions-network.sh;
else exit 1; else exit 1;
fi fi
...@@ -82,95 +89,109 @@ function check_status ...@@ -82,95 +89,109 @@ function check_status
# Check if service is already installed and show it's status # Check if service is already installed and show it's status
# #
dialog --backtitle "$BACKTITLE" --title "Please wait" --infobox "\nLoading install info ... " 5 28 dialog --backtitle "$BACKTITLE" --title "Please wait" --infobox "\nLoading install info ... " 5 28
LIST=() LIST=()
LIST_CONST=3 LIST_CONST=24
# Samba # Samba
SAMBA_STATUS="$(check_if_installed samba && echo "on" || echo "off" )" SAMBA_STATUS="$(check_if_installed samba && echo "on" || echo "off" )"
alive_port "Windows compatible file sharing" "445" "boolean" alive_port "Windows compatible file sharing" "445" "boolean"
LIST+=( "Samba" "$DESCRIPTION" "$SAMBA_STATUS" ) LIST+=( "Samba" "$DESCRIPTION" "$SAMBA_STATUS" )
# CUPS # CUPS
CUPS_STATUS="$(check_if_installed cups && echo "on" || echo "off" )" CUPS_STATUS="$(check_if_installed cups && echo "on" || echo "off" )"
alive_port "Common UNIX Printing System (CUPS)" "631" "boolean" alive_port "Common UNIX Printing System (CUPS)" "631" "boolean"
LIST+=( "CUPS" "$DESCRIPTION" "$CUPS_STATUS" ) LIST+=( "CUPS" "$DESCRIPTION" "$CUPS_STATUS" )
# TV headend # TV headend
TVHEADEND_STATUS="$(check_if_installed tvheadend && echo "on" || echo "off" )" TVHEADEND_STATUS="$(check_if_installed tvheadend && echo "on" || echo "off" )"
alive_port "TV streaming server" "9981" alive_port "TV streaming server" "9981"
LIST+=( "TV headend" "$DESCRIPTION" "$TVHEADEND_STATUS" ) LIST+=( "TV headend" "$DESCRIPTION" "$TVHEADEND_STATUS" )
# Synthing # Synthing
SYNCTHING_STATUS="$([[ -d /usr/bin/syncthing ]] && echo "on" || echo "off" )" SYNCTHING_STATUS="$([[ -d /usr/bin/syncthing ]] && echo "on" || echo "off" )"
alive_port "Personal cloud @syncthing.net" "8384" "boolean" alive_port "Personal cloud @syncthing.net" "8384" "boolean"
LIST+=( "Syncthing" "$DESCRIPTION" "$SYNCTHING_STATUS" ) LIST+=( "Syncthing" "$DESCRIPTION" "$SYNCTHING_STATUS" )
# Exagear # Exagear
if [[ "$(check_if_installed xserver-xorg && echo "on")" == "on" && "$family" == "Ubuntu" ]]; then if [[ "$(check_if_installed xserver-xorg && echo "on")" == "on" && "$family" == "Ubuntu" ]]; then
EXAGEAR_STATUS="$(check_if_installed exagear-armbian && echo "on" || echo "off" )" EXAGEAR_STATUS="$(check_if_installed exagear-armbian && echo "on" || echo "off" )"
LIST+=( "ExaGear" "32bit x86 Linux/Windows emulator trial" "$EXAGEAR_STATUS" ) LIST+=( "ExaGear" "32bit x86 Linux/Windows emulator trial" "$EXAGEAR_STATUS" )
fi LIST_CONST=$((LIST_CONST + 1))
fi
if [[ "$(dpkg --print-architecture)" == "armhf" || "$(dpkg --print-architecture)" == "amd64" ]]; then # VPN
LIST_CONST=2 if [[ "$(dpkg --print-architecture)" == "armhf" || "$(dpkg --print-architecture)" == "amd64" ]]; then
# vpn server # vpn server
VPN_SERVER_STATUS="$([[ -d /usr/local/vpnserver ]] && echo "on" || echo "off" )" VPN_SERVER_STATUS="$([[ -d /usr/local/vpnserver ]] && echo "on" || echo "off" )"
LIST+=( "VPN server" "Softether VPN server" "$VPN_SERVER_STATUS" ) LIST+=( "VPN server" "Softether VPN server" "$VPN_SERVER_STATUS" )
# vpn client # vpn client
VPN_CLIENT_STATUS="$([[ -d /usr/local/vpnclient ]] && echo "on" || echo "off" )" VPN_CLIENT_STATUS="$([[ -d /usr/local/vpnclient ]] && echo "on" || echo "off" )"
LIST+=( "VPN client" "Softether VPN client" "$VPN_CLIENT_STATUS" ) LIST+=( "VPN client" "Softether VPN client" "$VPN_CLIENT_STATUS" )
fi LIST_CONST=$((LIST_CONST + 1))
# NCP fi
NCP_STATUS="$( [[ -d /var/www/nextcloud ]] && echo "on" || echo "off" )"
[[ "$family" != "Ubuntu" ]] && LIST+=( "NCP" "Nextcloud personal cloud" "$NCP_STATUS" ) # NCP
# OMV NCP_STATUS="$( [[ -d /var/www/nextcloud ]] && echo "on" || echo "off" )"
OMV_STATUS="$(check_if_installed openmediavault && echo "on" || echo "off" )" [[ "$family" != "Ubuntu" ]] && LIST+=( "NCP" "Nextcloud personal cloud" "$NCP_STATUS" ) \
[[ "$family" != "Ubuntu" ]] && LIST+=( "OMV" "OpenMediaVault NAS solution" "$OMV_STATUS" ) && LIST_CONST=3 && LIST_CONST=$((LIST_CONST + 1))
# Plex media server # OMV
PLEX_STATUS="$((check_if_installed plexmediaserver || check_if_installed plexmediaserver-installer) && echo "on" || echo "off" )" OMV_STATUS="$(check_if_installed openmediavault && echo "on" || echo "off" )"
alive_port "Plex media server" "32400" [[ "$family" != "Ubuntu" ]] && LIST+=( "OMV" "OpenMediaVault NAS solution" "$OMV_STATUS" ) \
LIST+=( "Plex" "$DESCRIPTION" "$PLEX_STATUS" ) && LIST_CONST=$((LIST_CONST + 1))
# Radarr # Plex media server
RADARR_STATUS="$([[ -d /opt/Radarr ]] && echo "on" || echo "off" )" PLEX_STATUS="$((check_if_installed plexmediaserver || check_if_installed plexmediaserver-installer) \
alive_port "Movies downloading server" "7878" && echo "on" || echo "off" )"
LIST+=( "Radarr" "$DESCRIPTION" "$RADARR_STATUS" ) alive_port "Plex media server" "32400"
LIST+=( "Plex" "$DESCRIPTION" "$PLEX_STATUS" )
# Sonarr
SONARR_STATUS="$([[ -d /opt/NzbDrone ]] && echo "on" || echo "off" )" # Radarr
alive_port "TV shows downloading server" "8989" RADARR_STATUS="$([[ -d /opt/Radarr ]] && echo "on" || echo "off" )"
LIST+=( "Sonarr" "$DESCRIPTION" "$SONARR_STATUS" ) alive_port "Movies downloading server" "7878"
LIST+=( "Radarr" "$DESCRIPTION" "$RADARR_STATUS" )
# MINIdlna
MINIDLNA_STATUS="$(check_if_installed minidlna && echo "on" || echo "off" )" # Sonarr
alive_port "Lightweight DLNA/UPnP-AV server" "8200" "boolean" SONARR_STATUS="$([[ -d /opt/NzbDrone ]] && echo "on" || echo "off" )"
LIST+=( "Minidlna" "$DESCRIPTION" "$MINIDLNA_STATUS" ) alive_port "TV shows downloading server" "8989"
LIST+=( "Sonarr" "$DESCRIPTION" "$SONARR_STATUS" )
# Pi hole
PI_HOLE_STATUS="$([[ -d /etc/pihole ]] && echo "on" || echo "off" )" # MINIdlna
alive_process "Ad blocker" "pihole-FTL" MINIDLNA_STATUS="$(check_if_installed minidlna && echo "on" || echo "off" )"
LIST+=( "Pi hole" "$DESCRIPTION" "$PI_HOLE_STATUS" ) alive_port "Lightweight DLNA/UPnP-AV server" "8200" "boolean"
LIST+=( "Minidlna" "$DESCRIPTION" "$MINIDLNA_STATUS" )
# Transmission
TRANSMISSION_STATUS="$(check_if_installed transmission-daemon && echo "on" || echo "off" )" # Pi hole
alive_port "Torrent download server" "9091" "boolean" PI_HOLE_STATUS="$([[ -d /etc/pihole ]] && echo "on" || echo "off" )"
LIST+=( "Transmission" "$DESCRIPTION" "$TRANSMISSION_STATUS" ) alive_process "Ad blocker" "pihole-FTL"
LIST+=( "Pi hole" "$DESCRIPTION" "$PI_HOLE_STATUS" )
# UrBackup # Transmission
URBACKUP_STATUS="$((check_if_installed urbackup-server || check_if_installed urbackup-server-dbg) && echo "on" || echo "off" )" TRANSMISSION_STATUS="$(check_if_installed transmission-daemon && echo "on" || echo "off" )"
alive_port "Client/server backup system" "51413" "boolean" alive_port "Torrent download server" "9091" "boolean"
LIST+=( "UrBackup" "$DESCRIPTION" "$URBACKUP_STATUS" ) LIST+=( "Transmission" "$DESCRIPTION" "$TRANSMISSION_STATUS" )
# Docker
DOCKER_STATUS="$((check_if_installed docker-ce) && echo "on" || echo "off" )" # UrBackup
LIST+=( "Docker" "Run applications by using containers" "$DOCKER_STATUS") URBACKUP_STATUS="$((check_if_installed urbackup-server || check_if_installed urbackup-server-dbg) \
&& echo "on" || echo "off" )"
# ISPconfig alive_port "Client/server backup system" "51413" "boolean"
ISPCONFIG_STATUS="$([[ -d /usr/local/ispconfig ]] && echo "on" || echo "off" )" LIST+=( "UrBackup" "$DESCRIPTION" "$URBACKUP_STATUS" )
LIST+=( "ISPConfig" "SMTP mail, IMAP, POP3 & LAMP/LEMP web server" "$ISPCONFIG_STATUS" )
# Mayan EDMS
curl --output /dev/null --silent --head --fail http://localhost/authentication/login/?next=
MAYAN_STATUS=$([[ $? -eq 0 ]] && echo "on" || echo "off")
LIST+=( "Mayan EDMS" "Electronic vault for your documents" "$MAYAN_STATUS")
# Docker
DOCKER_STATUS="$((check_if_installed docker-ce) && echo "on" || echo "off" )"
LIST+=( "Docker" "Run applications by using containers" "$DOCKER_STATUS")
# ISPconfig
ISPCONFIG_STATUS="$([[ -d /usr/local/ispconfig ]] && echo "on" || echo "off" )"
LIST+=( "ISPConfig" "SMTP mail, IMAP, POP3 & LAMP/LEMP web server" "$ISPCONFIG_STATUS" )
} }
...@@ -1436,7 +1457,7 @@ while true; do ...@@ -1436,7 +1457,7 @@ while true; do
LISTLENGHT="$((${#LIST[@]}/2))" LISTLENGHT="$((${#LIST[@]}/2))"
exec 3>&1 exec 3>&1
selection=$(dialog --backtitle "$BACKTITLE" --title "Installing to $family $distribution" --colors --clear --cancel-label \ selection=$(dialog --backtitle "$BACKTITLE" --title "Installing to $family $distribution" --colors --clear --cancel-label \
"Exit" --checklist "\nChoose what you want to install:\n " $(($LISTLENGHT+$LIST_CONST)) 70 15 "${LIST[@]}" 2>&1 1>&3) "Exit" --checklist "\nChoose what you want to install:\n " $LIST_CONST 70 18 "${LIST[@]}" 2>&1 1>&3)
exit_status=$? exit_status=$?
exec 3>&- exec 3>&-
case $exit_status in case $exit_status in
...@@ -1565,6 +1586,11 @@ while true; do ...@@ -1565,6 +1586,11 @@ while true; do
selection=${selection//UrBackup/} selection=${selection//UrBackup/}
fi fi
if [[ "$selection" == *Mayan* && "$MAYAN_STATUS" != "on" ]]; then
curl -sSL get.mayan-edms.com | bash
selection=${selection//Mayan/}
fi
i=$[$i+1] i=$[$i+1]
done done
# reread statuses # reread statuses
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment