change container to use alpine instead of curl

This commit is contained in:
2024-07-02 14:56:40 +01:00
parent b7e3895065
commit 3db2c084a2
6 changed files with 252 additions and 0 deletions
@@ -0,0 +1,23 @@
apiVersion: v1
data:
export_calendars.sh: |
#!/usr/bin/env bash
apk update
apk add curl
list='capgemini Birmingham Cesi Papa Blueberry Personal Prometheus Birthday Maman Capgemini_CA-GIP Shared'
today_date=$(date "+%Y-%m-%d")
mkdir /backup/$today_date
for element in $list;do
curl -u $PI_USER_USERNAME:$PI_USER_PASSWORD https://nextcloud.tryton.geeraert.eu/remote.php/dav/calendars/pi/$element/\?export -o /backup/$today_date/calendar_$element.ics
done
export_contacts.sh: |
#!/usr/bin/env bash
apk update
apk add curl
today_date=$(date "+%Y-%m-%d")
mkdir /backup/$today_date
curl -u $PI_USER_USERNAME:$PI_USER_PASSWORD https://nextcloud.tryton.geeraert.eu/remote.php/dav/addressbooks/users/pi/contacts/?export -o /backup/$today_date/contact_$today_date.vcf
kind: ConfigMap
metadata:
creationTimestamp: null
name: nextcloud-export-scripts