mirror of
https://github.com/getAlby/hub.git
synced 2026-08-13 12:33:39 +02:00
fix rpi-install shared-libs/setcap conflict for non-root user (#622)
* add albyhub lib dir to ld.so.conf to allow setcap and shared libs + install lsof * fix sudo tee * remove lsof install + checking of port 80 * remove -a from tee * chore: update install scripts --------- Co-authored-by: Michael Bumann <hello@michaelbumann.com>
This commit is contained in:
parent
49449f0dfc
commit
3d0f02b9f9
3 changed files with 10 additions and 18 deletions
|
|
@ -30,7 +30,7 @@ rm server-linux-x86_64.tar.bz2
|
|||
mkdir -p $INSTALL_DIR/data
|
||||
|
||||
# create a simple start script that sets the default configuration variables
|
||||
tee -a $INSTALL_DIR/start.sh > /dev/null << EOF
|
||||
tee $INSTALL_DIR/start.sh > /dev/null << EOF
|
||||
#!/bin/bash
|
||||
|
||||
echo "Starting Alby Hub"
|
||||
|
|
|
|||
|
|
@ -23,17 +23,12 @@ rm server-linux-aarch64.tar.bz2
|
|||
# allow albyhub to bind on port 80
|
||||
sudo setcap CAP_NET_BIND_SERVICE=+eip /opt/albyhub/bin/albyhub
|
||||
|
||||
# Use port 80 if available otherwise 8029
|
||||
if sudo lsof -Pi :80 -sTCP:LISTEN -t >/dev/null ; then
|
||||
PORT=8029
|
||||
URL="http://$HOSTNAME.local:8029"
|
||||
else
|
||||
PORT=80
|
||||
URL="http://$HOSTNAME.local"
|
||||
fi
|
||||
# make libs available
|
||||
echo "/opt/albyhub/lib" | sudo tee /etc/ld.so.conf.d/albyhub.conf
|
||||
sudo ldconfig
|
||||
|
||||
### Create systemd service
|
||||
sudo tee -a /etc/systemd/system/albyhub.service > /dev/null << EOF
|
||||
sudo tee /etc/systemd/system/albyhub.service > /dev/null << EOF
|
||||
[Unit]
|
||||
Description=Alby Hub
|
||||
After=network-online.target
|
||||
|
|
|
|||
|
|
@ -23,14 +23,11 @@ rm server-linux-armv6.tar.bz2
|
|||
# allow albyhub to bind on port 80
|
||||
sudo setcap CAP_NET_BIND_SERVICE=+eip /opt/albyhub/bin/albyhub
|
||||
|
||||
# Use port 80 if available otherwise 8029
|
||||
if sudo lsof -Pi :80 -sTCP:LISTEN -t >/dev/null ; then
|
||||
PORT=8029
|
||||
URL="http://$HOSTNAME.local:8029"
|
||||
else
|
||||
PORT=80
|
||||
URL="http://$HOSTNAME.local"
|
||||
fi
|
||||
echo "/opt/albyhub/lib" | sudo tee /etc/ld.so.conf.d/albyhub.conf
|
||||
sudo ldconfig
|
||||
|
||||
PORT=80
|
||||
URL="http://$HOSTNAME.local"
|
||||
|
||||
### Create systemd service
|
||||
sudo tee /etc/systemd/system/albyhub.service > /dev/null << EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue