diff --git a/bin/backuptool b/bin/backuptool index a01100c..e3357ed 100755 --- a/bin/backuptool +++ b/bin/backuptool @@ -67,6 +67,10 @@ backupservice() { docker exec pdnsmysql mysqldump -uroot -p${MYSQL_PASSWORD} bookstack | gzip -9 > /federated/apps/bookstack/dump_$SERVICE.sql.gz PASSPHRASE=$GPG_PASSPHRASE duplicity /federated/apps/$SERVICE b2://$B2_APPLICATION_KEY_ID:$B2_APPLICATION_KEY@$UUID/$SERVICE/ rm /federated/apps/bookstack/dump_$SERVICE.sql.gz + elif [ "$SERVICE" = "espocrm" ]; then + docker exec pdnsmysql mysqldump -uroot -p${MYSQL_PASSWORD} espocrm | gzip -9 > /federated/apps/espocrm/dump_$SERVICE.sql.gz + PASSPHRASE=$GPG_PASSPHRASE duplicity /federated/apps/$SERVICE b2://$B2_APPLICATION_KEY_ID:$B2_APPLICATION_KEY@$UUID/$SERVICE/ + rm /federated/apps/espocrm/dump_$SERVICE.sql.gz else # For all other services, If the postgresql database exists for that service then dump it docker exec postgresql psql -U $SERVICE -c '\q' &>/dev/null @@ -115,6 +119,10 @@ backupserviceall() { docker exec pdnsmysql mysqldump -uroot -p${MYSQL_PASSWORD} bookstack | gzip -9 > /federated/apps/bookstack/dump_$i.sql.gz PASSPHRASE=$GPG_PASSPHRASE duplicity /federated/apps/$i b2://$B2_APPLICATION_KEY_ID:$B2_APPLICATION_KEY@$UUID/$i/ rm /federated/apps/bookstack/dump_$i.sql.gz + elif [ "$i" = "espocrm" ]; then + docker exec pdnsmysql mysqldump -uroot -p${MYSQL_PASSWORD} espocrm | gzip -9 > /federated/apps/espocrm/dump_$i.sql.gz + PASSPHRASE=$GPG_PASSPHRASE duplicity /federated/apps/$i b2://$B2_APPLICATION_KEY_ID:$B2_APPLICATION_KEY@$UUID/$i/ + rm /federated/apps/espocrm/dump_$i.sql.gz else docker exec postgresql psql -U $i -c '\q' &>/dev/null if [ $? -eq 0 ]; then diff --git a/lib/espocrm.sh b/lib/espocrm.sh new file mode 100644 index 0000000..de360fc --- /dev/null +++ b/lib/espocrm.sh @@ -0,0 +1,105 @@ +#!/bin/bash +# +# EspoCRM Service + +PATH=$HOME/.docker/cli-plugins:/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +config_espocrm() { + echo -ne "\n* Configuring /federated/apps/espocrm container.." + spin & + SPINPID=$! + + if [ ! -d "/federated/apps/espocrm" ]; then + mkdir -p /federated/apps/espocrm/data/var/www/html + fi + +cat > /federated/apps/espocrm/docker-compose.yml < /federated/apps/espocrm/.env < /dev/null +echo -ne "done." +} +start_espocrm() { + # Start service with command to make sure it's up before proceeding + start_service "espocrm" "nc -z 172.99.0.39 80 &> /dev/null" "7" + + docker exec pdns pdnsutil add-record $DOMAIN espocrm A 86400 $EXTERNALIP + [ $? -ne 0 ] && fail "Couldn't add dns record for espocrm" + + kill -9 $SPINPID &> /dev/null + echo -ne "done." +} diff --git a/lib/functions.sh b/lib/functions.sh index 1f1e447..21f2d8f 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -1,7 +1,7 @@ # Federated Computer functions # Define all services -SERVICES=("pdnsmysql" "pdns" "pdnsadmin" "traefik" "postgresql" "ldap" "mail" "collabora" "nextcloud" "matrix" "element" "listmonk" "vaultwarden" "panel" "wireguard" "jitsi" "baserow" "gitea" "caddy" "autodiscover" "castopod" "wordpress" "coturn" "bookstack" "freescout" "msp") +SERVICES=("pdnsmysql" "pdns" "pdnsadmin" "traefik" "postgresql" "ldap" "mail" "collabora" "nextcloud" "matrix" "element" "listmonk" "vaultwarden" "panel" "wireguard" "jitsi" "baserow" "gitea" "caddy" "autodiscover" "castopod" "wordpress" "coturn" "bookstack" "freescout" "msp" "espocrm") fail() { echo -ne "FAILED\n\n$1\n\n" @@ -420,6 +420,14 @@ Here is your applications reference chart with $DOMAIN: Click here Music Side Project Studio enables you to harness the potential of RSS feeds and the Lightning Network, allowing you to self-host your music and receive direct payment from your fans + + EspoCRM + espocrm.$DOMAIN + admin@$DOMAIN
admin password above + All users in panel can access EspoCRM using user@domain.com + Click here + EspoCRM is an Open Source CRM (Customer Relationship Management) software that allows you to see, enter and evaluate all your company relationships +

Thanks for your support!

@@ -656,6 +664,14 @@ Password = "$LISTMONKPASS" Click here Music Side Project Studio enables you to harness the potential of RSS feeds and the Lightning Network, allowing you to self-host your music and receive direct payment from your fans + + EspoCRM + espocrm.$DOMAIN + admin@$DOMAIN
admin password above + All users in panel can access EspoCRM using user@domain.com + Click here + EspoCRM is an Open Source CRM (Customer Relationship Management) software that allows you to see, enter and evaluate all your company relationships +