Compare commits
7 Commits
e8ac879403
...
dev-fix-re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a29347686e | ||
|
|
52d217ca1d | ||
|
|
ae8320118a | ||
|
|
07fedd0b0b | ||
|
|
f17988bfa9 | ||
| c79625a64a | |||
|
|
8e40af9002 |
@@ -17,7 +17,6 @@ steps:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
- name: docker-test
|
||||
image: plugins/docker
|
||||
settings:
|
||||
@@ -34,4 +33,3 @@ steps:
|
||||
- dev*
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
@@ -1,8 +1,6 @@
|
||||
def healthcheck_ping(req_obj, url, start=False):
|
||||
if start == True:
|
||||
url + '/start'
|
||||
def healthcheck_ping(req_obj, url):
|
||||
try:
|
||||
req_obj.get(url, timeout=10)
|
||||
req_obj.get(url, timeout=5)
|
||||
except req_obj.RequestException as e:
|
||||
# Log ping failure here...
|
||||
print("Ping failed: %s" % e)
|
||||
@@ -7,3 +7,6 @@ need 'RESTIC_REPOSITORY' environmental variable
|
||||
need 'AWS_ACCESS_KEY_ID' environmental variable
|
||||
need 'AWS_SECRET_ACCESS_KEY' environmental variable
|
||||
|
||||
[](https://drone.jonb.io/jblu/seafile-backup)
|
||||
|
||||

|
||||
@@ -3,10 +3,9 @@
|
||||
: "${AWS_ACCESS_KEY_ID:?Need the access key id}"
|
||||
: "${AWS_SECRET_ACCESS_KEY:?Need the secret access key}"
|
||||
: "${RESTIC_PASSWORD:?Need the restic password}"
|
||||
: "${LOG_PATH:-./restic-backup.log}"
|
||||
: "${LOG_PATH:-/var/log/restic-backup.log}"
|
||||
: "${seafile_data_local:-/seafile}"
|
||||
|
||||
# need to securely provide password: https://restic.readthedocs.io/en/latest/faq.html#how-can-i-specify-encryption-passwords-automatically
|
||||
restic snapshots > /dev/null || restic init
|
||||
|
||||
#Define a timestamp function
|
||||
|
||||
@@ -79,7 +79,7 @@ apprise_body = os.getenv("apprise_body")
|
||||
|
||||
# healthcheck - Tell healthchecks.io we are starting the backup
|
||||
if healthcheck:
|
||||
healthcheck_ping(r, healthcheck_url, start=True)
|
||||
healthcheck_ping(r, healthcheck_url.rstrip("/") + "/start")
|
||||
|
||||
# Stop seafile and seafile hub
|
||||
if docker_command:
|
||||
|
||||
Reference in New Issue
Block a user