summarylogtreecommitdiffstats
path: root/skywire.install
diff options
context:
space:
mode:
authorMoses Narrow2020-11-29 16:39:51 -0600
committerMoses Narrow2020-11-29 16:39:51 -0600
commit8cfc36de2073928f5919059065234951a29bf639 (patch)
tree26ae3d16d25451b923ab70095ccf201887ba03eb /skywire.install
parent9ffd1e80ffb0abad3a5a07ab3a0cb7e34abf06ed (diff)
downloadaur-8cfc36de2073928f5919059065234951a29bf639.tar.gz
fix PKGBUILD
Diffstat (limited to 'skywire.install')
-rw-r--r--skywire.install21
1 files changed, 14 insertions, 7 deletions
diff --git a/skywire.install b/skywire.install
index 6c5392731be6..ae29ba942e10 100644
--- a/skywire.install
+++ b/skywire.install
@@ -3,17 +3,24 @@ post_install() {
systemctl disable --now skywire.service
systemctl disable --now skywire-visor.service
#config generation writes in the current dir;
- #so we want to make anything spawned by the process appear as a subdirectory of /root
- cd ~/
+ #so we want to make anything spawned by the process appear as a subdirectory of install dir
+ cd /opt/skywire/
#try to reuse old config
- [[ -f /opt/skywire/skywire.json ]] && cp -b /opt/skywire/skywire.json ~/skywire.json
+ [[ -f /opt/skywire/skywire.json ]] && cp -b /opt/skywire/skywire.json /opt/skywire/skywire.json.gen
#generate hypervisor configuration
- skywire-cli visor gen-config --is-hypervisor -p -r -o skywire.json
- mv skywire.json /opt/skywire/skywire.json
+ skywire-cli visor gen-config --is-hypervisor -p -r -o /opt/skywire/skywire.json.gen
+ mv /opt/skywire/skywire.json.gen /opt/skywire/skywire.json
skywire-tls-gen
+ systemctl enable --now skywire.service
echo "Skywire has been configured, starting now on https://127.0.0.1:8000"
- systemctl enable --now skywire.service
- echo "run keypkg-gen to generate the distributable public key package"
+ _lanip=$(ifconfig | grep inet | head -n 1)
+ _lanip=${_lanip##*inet }
+ _lanip=${_lanip%% *}
+ echo "Access from local network at: https://${_lanip}:8000"
+ _pubkey=$(cat /opt/skywire/skywire.json | grep pk\")
+ _pubkey=${_pubkey#*: }
+ echo "Visor Public Key: ${_pubkey}"
+ echo "run keypkg-gen to generate the distributable public key package"
}
#pre-upgrade() {