From 19703c0336016e26e83bb4ae612b000f1f30aad9 Mon Sep 17 00:00:00 2001
From: Bob Mottram
Date: Tue, 12 Nov 2019 21:18:33 +0000
Subject: [PATCH] Change example install directory to /opt
---
README.md | 10 +++++-----
scripts/devrepo | 6 +++++-
website/index.html | 10 +++++-----
3 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
index fa349c51..2afa62b0 100644
--- a/README.md
+++ b/README.md
@@ -41,7 +41,7 @@ The following instructions install Epicyon to the **/etc** directory. It's not e
Add a dedicated user so that we don't have to run as root.
``` bash
-adduser --system --home=/etc/epicyon --group epicyon
+adduser --system --home=/opt/epicyon --group epicyon
```
Edit */etc/systemd/system/epicyon.service* and add the following:
@@ -56,8 +56,8 @@ After=network.target
Type=simple
User=epicyon
Group=epicyon
-WorkingDirectory=/etc/epicyon
-ExecStart=/usr/bin/python3 /etc/epicyon/epicyon.py --port 443 --proxy 7156 --domain YOUR_DOMAIN --registration open
+WorkingDirectory=/opt/epicyon
+ExecStart=/usr/bin/python3 /opt/epicyon/epicyon.py --port 443 --proxy 7156 --domain YOUR_DOMAIN --registration open
Environment=USER=epicyon
Restart=always
StandardError=syslog
@@ -66,13 +66,13 @@ StandardError=syslog
WantedBy=multi-user.target
```
-Here the server was installed to */etc/epicyon*, but you can change that to wherever you installed it.
+Here the server was installed to */opt/epicyon*, but you can change that to wherever you installed it.
Then run the daemon:
``` bash
systemctl enable epicyon
-chown -R epicyon:epicyon /etc/epicyon
+chown -R epicyon:epicyon /opt/epicyon
systemctl start epicyon
```
diff --git a/scripts/devrepo b/scripts/devrepo
index 9d8b2abd..92260e1a 100755
--- a/scripts/devrepo
+++ b/scripts/devrepo
@@ -1,4 +1,8 @@
#!/bin/bash
-cd /etc/epicyon || exit 0
+if [ -d /etc/epicyon ]; then
+ cd /etc/epicyon || exit 0
+else
+ cd /opt/epicyon || exit 0
+fi
git remote set-url origin https://code.freedombone.net/bashrc/epicyon.git
git checkout main
diff --git a/website/index.html b/website/index.html
index 9ee2a570..1aff979b 100644
--- a/website/index.html
+++ b/website/index.html
@@ -1238,7 +1238,7 @@
sudo su
-
adduser --system --home=/etc/epicyon --group epicyon
+
adduser --system --home=/opt/epicyon --group epicyon
@@ -1247,14 +1247,14 @@
cd /etc
git clone https://gitlab.com/bashrc2/epicyon
-
chown -R epicyon:epicyon /etc/epicyon
+
chown -R epicyon:epicyon /opt/epicyon
If you want to use a theme other than the default one:
-
cd /etc/epicyon
+
cd /opt/epicyon
theme purple
@@ -1280,8 +1280,8 @@
Type=simple
User=epicyon
Group=epicyon
- WorkingDirectory=/etc/epicyon
- ExecStart=/usr/bin/python3 /etc/epicyon/epicyon.py --port 443 --proxy 7156 --domain YOUR_DOMAIN --registration open --debug
+ WorkingDirectory=/opt/epicyon
+ ExecStart=/usr/bin/python3 /opt/epicyon/epicyon.py --port 443 --proxy 7156 --domain YOUR_DOMAIN --registration open --debug
Environment=USER=epicyon
Restart=always
StandardError=syslog