Skip to content

Commit

Permalink
work
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperknot committed Dec 27, 2023
1 parent 231469a commit 9334e6a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
3 changes: 2 additions & 1 deletion init-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,14 @@ def prepare_tile_gen(c):
put(
c,
CONFIG_DIR / 'rclone.conf',
REMOTE_CONFIG,
f'{REMOTE_CONFIG}/rclone.conf',
permissions='600',
create_parent_dir=True,
)

c.sudo('chown ofm:ofm /data/ofm')
c.sudo('chown -R ofm:ofm /data/ofm/tile_gen')
c.sudo('chown -R ofm:ofm /data/ofm/config')

sudo_cmd(c, f'cd {TILE_GEN_BIN} && source prepare-virtualenv.sh', user='ofm')

Expand Down
2 changes: 1 addition & 1 deletion scripts/tile_gen/planetiler_monaco.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ java -Xmx1g \
rm -r data
echo planetiler.jar DONE

$TILE_GEN_BIN/extract_btrfs.sh
$TILE_GEN_BIN/extract_btrfs.sh
17 changes: 15 additions & 2 deletions scripts/tile_gen/upload_cloudflare.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
#!/usr/bin/env bash
set -e

DIR_NAME="${PWD##*/}"
RUN_STR=$(basename "$PWD")
AREA=$(basename "$(dirname "$PWD")")


if [[ $AREA != "planet" && $AREA != "monaco" ]]; then
echo "Area must be 'planet' or 'monaco'. Terminating."
exit 1
fi

if [ ! -f /data/ofm/config/rclone.conf ]; then
echo "rclone.conf does not exist. Terminating."
exit 1
fi


rm -f rclone.log

Expand All @@ -15,5 +28,5 @@ rclone sync \
--stats-one-line \
--log-file rclone.log \
--exclude rclone.log \
. "cf:ofm-planet/$DIR_NAME"
. "cf:ofm-$AREA/$RUN_STR"

0 comments on commit 9334e6a

Please sign in to comment.