mirror of
https://github.com/edv-pi/pbs-client-docker.git
synced 2025-04-15 07:42:55 +02:00
added possiblity to turn off encryption
This commit is contained in:
parent
5eefb6f671
commit
83406b84af
@ -26,4 +26,7 @@ PBS_FINGERPRINT=""
|
||||
HEALTHCHECKSUUID="aa7b0de3-2c17-4fce-b051-388a5415e656"
|
||||
HEALTHCHECKSHOSTNAME="https://healthchecks.mydomain.com"
|
||||
|
||||
TZ=Etc/UTC
|
||||
TZ=Etc/UTC
|
||||
|
||||
# Disable Encryption
|
||||
ENCRYPTION=1
|
@ -1,7 +1,6 @@
|
||||
version: '3.3'
|
||||
services:
|
||||
pbs-client:
|
||||
image: aterfax/pbs-client
|
||||
image: tmueller/pbs-client
|
||||
container_name: pbs-client
|
||||
hostname: pbs-client
|
||||
restart: unless-stopped
|
||||
|
@ -26,25 +26,29 @@ master_public_keyfile="/root/.config/proxmox-backup/master-public.pem"
|
||||
|
||||
expect="/usr/bin/expect"
|
||||
|
||||
# Check if client encryption keyfile exists and do stuff.
|
||||
if [ -f "$client_encryption_keyfile" ]; then
|
||||
echo "Client encryption keyfile exists. Skipping client encryption keyfile creation."
|
||||
if [ -n "$UNENCRYPTED" ]; then
|
||||
echo "Encryption not activated not gonna create any Keys."
|
||||
else
|
||||
echo "Client encryption keyfile does not exist. Creating new client encryption keyfile."
|
||||
$expect /etc/s6-overlay/s6-rc.d/key_setup/client_key
|
||||
fi
|
||||
# Check if client encryption keyfile exists and do stuff.
|
||||
if [ -f "$client_encryption_keyfile" ]; then
|
||||
echo "Client encryption keyfile exists. Skipping client encryption keyfile creation."
|
||||
else
|
||||
echo "Client encryption keyfile does not exist. Creating new client encryption keyfile."
|
||||
$expect /etc/s6-overlay/s6-rc.d/key_setup/client_key
|
||||
fi
|
||||
|
||||
# Check if both Master keyfiles exist and do stuff.
|
||||
if [ -f "$master_private_keyfile" ] && [ -f "$master_public_keyfile" ]; then
|
||||
echo "Both master private and public keys exist. Skipping client Master keyfiles creation."
|
||||
|
||||
elif [ ! -f "$master_private_keyfile" ] && [ ! -f "$master_public_keyfile" ]; then
|
||||
echo "Both master private and public keys do not exist. Creating master keyfiles new pair."
|
||||
cd /root/.config/proxmox-backup/ && $expect /etc/s6-overlay/s6-rc.d/key_setup/client_master_key
|
||||
|
||||
elif [ ! -f "$master_private_keyfile" ] || [ ! -f "$master_public_keyfile" ]; then
|
||||
echo "One of the master keyfiles is missing. Error! User intervention required. Ensure correct files present, or remove both: \n"
|
||||
echo "$master_private_keyfile \n"
|
||||
echo "$master_oublic_keyfile \n"
|
||||
echo "To allow for automatic key recreation."
|
||||
# Check if both Master keyfiles exist and do stuff.
|
||||
if [ -f "$master_private_keyfile" ] && [ -f "$master_public_keyfile" ]; then
|
||||
echo "Both master private and public keys exist. Skipping client Master keyfiles creation."
|
||||
|
||||
elif [ ! -f "$master_private_keyfile" ] && [ ! -f "$master_public_keyfile" ]; then
|
||||
echo "Both master private and public keys do not exist. Creating master keyfiles new pair."
|
||||
cd /root/.config/proxmox-backup/ && $expect /etc/s6-overlay/s6-rc.d/key_setup/client_master_key
|
||||
|
||||
elif [ ! -f "$master_private_keyfile" ] || [ ! -f "$master_public_keyfile" ]; then
|
||||
echo "One of the master keyfiles is missing. Error! User intervention required. Ensure correct files present, or remove both: \n"
|
||||
echo "$master_private_keyfile \n"
|
||||
echo "$master_oublic_keyfile \n"
|
||||
echo "To allow for automatic key recreation."
|
||||
fi
|
||||
fi
|
@ -30,6 +30,11 @@ if [ -z "$PBS_PASSWORD" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "$UNENCRYPTED" ]; then
|
||||
UNENCRYPTED="${UNENCRYPTED}"
|
||||
export UNENCRYPTED
|
||||
fi
|
||||
|
||||
HEALTHCHECKSURL="${HEALTHCHECKSHOSTNAME}/ping/${HEALTHCHECKSUUID}"
|
||||
|
||||
export HEALTHCHECKSURL="${HEALTHCHECKSURL}"
|
||||
|
Loading…
Reference in New Issue
Block a user