Skip to content

Commit 511f94e

Browse files
committed
fix: installer method
1 parent 78156bc commit 511f94e

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ wget -qO- https://openpod.recursion.space | sudo bash /dev/stdin [options] [argu
5555
To point to a bash script on GitHub, you can use:
5656

5757
```bash
58-
wget -qO- https://raw.githubusercontent.com/RecursionSpace/OpenPod/master/installer.sh | sudo bash
58+
wget -qO- https://raw.githubusercontent.com/RecursionSpace/OpenPod/master/installer.sh | sudo bash /dev/stdin [options] [arguments]
5959
```
6060

6161
| Option Flag | Description | Example |

installer.sh

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -205,30 +205,23 @@ cd OpenPod
205205
python${PYTHON_VERSION} -m venv "$VENV_DIR"
206206
$PYTHON_PATH -m pip install --upgrade pip
207207
$PYTHON_PATH -m pip install --no-input -U -r /opt/OpenPod/requirements.txt
208-
209-
echo "==> OpenPod installed successfully."
208+
rm -rf /opt/OpenPod/requirements.txt
210209

211210
# ---------------------------- Create Directories ---------------------------- #
212211
mkdir -p /opt/OpenPod/logs
213212
mkdir -p /opt/OpenPod/data
214213

215-
echo "==> OpenPod directories created."
216-
217214
# ------------------------------- Create Files ------------------------------- #
218215
# Log Location
219216
touch /opt/OpenPod/logs/RecursionLog.log
220217
touch /opt/OpenPod/logs/System.Snapshot
221218

222-
echo "==> OpenPod files created."
223-
224219
# Data Location
225220
touch /opt/OpenPod/data/dump.json
226221
touch /opt/OpenPod/data/nodes.json
227222
touch /opt/OpenPod/data/owners.json
228223
touch /opt/OpenPod/data/permissions.json
229224

230-
echo "==> OpenPod data files created."
231-
232225
# ------------------------------- Hardware Info ------------------------------ #
233226
hw_controller=$(grep Hardware /proc/cpuinfo | awk '{print $3}' || echo "unknown")
234227
hw_revision=$(grep Revision /proc/cpuinfo | awk '{print $3}' || echo "unknown")
@@ -277,11 +270,14 @@ led_io = 23
277270
led_stat = 17
278271
EOF
279272

280-
# --------------------------- Create Version Folder -------------------------- #
281-
mkdir -p /opt/OpenPod/versions/"$openpod_version"
282-
cp -a /opt/OpenPod/openpod/. /opt/OpenPod/versions/"$openpod_version"/
273+
# ------------------------- Create Release Directory ------------------------- #
274+
mkdir -p /opt/OpenPod/releases/"$openpod_version"
275+
cp -a /opt/OpenPod/openpod/. /opt/OpenPod/releases/"$openpod_version"/
283276
rm -rf /opt/OpenPod/openpod
284277

278+
# ------------------------------ Symlink Release ----------------------------- #
279+
ln -s /opt/OpenPod/releases/"$openpod_version" /opt/OpenPod/current
280+
285281
# --------------------------- Setup OpenPod Service -------------------------- #
286282
service_file="/etc/systemd/system/openpod.service"
287283
cat <<EOF > "$service_file"
@@ -303,9 +299,7 @@ with open("/opt/OpenPod/openpod.toml", "rb") as f:
303299
print(data["openpod"]["version"])
304300
')"
305301
306-
ExecStart = /opt/OpenPod/venv/bin/python \
307-
/opt/OpenPod/versions/\$OPENPOD_VERSION/pod.py
308-
302+
ExecStart=/opt/OpenPod/venv/bin/python /opt/OpenPod/current/pod.py
309303
310304
Restart = always
311305
RestartSec = 10

0 commit comments

Comments
 (0)