An experimental IndieWeb site built in Go.
1#!/bin/bash
2set -e
3
4echo "Starting script"
5
6# Restore the database if it does not already exist.
7if [ -f /data/data.db ]; then
8 echo "Database already exists, skipping restore"
9else
10 echo "No database found, restoring from replica if exists"
11 litestream restore -if-replica-exists /data/data.db
12fi
13
14# Run litestream with your app as the subprocess.
15exec litestream replicate -exec "/space"