Use a script to start urbit ship to handle restarts

This commit is contained in:
2023-11-30 11:54:52 +05:30
parent 156e3611a0
commit 92c86b2cf4
5 changed files with 24 additions and 6 deletions
View File
@@ -0,0 +1,17 @@
#!/bin/bash
set -e
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
pier_dir="/urbit/zod"
# Check if the directory exists
if [ -d "$pier_dir" ]; then
echo "Pier directory already exists, rebooting..."
urbit -t zod
else
echo "Creating a new fake ship..."
urbit -t -F zod
fi