diff --git a/ct/oxicloud.sh b/ct/oxicloud.sh index c33cf9505..fc16fa086 100644 --- a/ct/oxicloud.sh +++ b/ct/oxicloud.sh @@ -40,8 +40,9 @@ function update_script() { RUST_TOOLCHAIN=$TOOLCHAIN setup_rust msg_info "Updating OxiCloud" + PG_DB_PASS="$(sed -n '/Password:/s/[^:]*:[[:space:]]//p' ~/oxicloud.creds)" cd /opt/oxicloud - export DATABASE_URL="postgres://${PG_DB_USER}:${PG_DB_PASS}@localhost/${PG_DB_NAME}" + export DATABASE_URL="postgres://oxicloud:${PG_DB_PASS}@localhost/oxicloud" $STD cargo build --release mv target/release/oxicloud /usr/bin/oxicloud && chmod +x /usr/bin/oxicloud msg_ok "Updated OxiCloud" diff --git a/install/oxicloud-install.sh b/install/oxicloud-install.sh index f45b96bae..c3cdd070d 100644 --- a/install/oxicloud-install.sh +++ b/install/oxicloud-install.sh @@ -35,7 +35,7 @@ msg_info "Configuring OxiCloud" mkdir -p {/mnt/oxicloud,/etc/oxicloud} sed -e 's|_STORAGE_PATH=.*|_STORAGE_PATH=/mnt/oxicloud|' \ -e 's|_SERVER_HOST=.*|_SERVER_HOST=0.0.0.0|' \ - -e "s|^#OXICLOUD_BASE_URL=.*|OXICLOUD_BASE_URL=${LOCAL_IP}:8086|" \ + -e "s|^#OXICLOUD_BASE_URL=.*|OXICLOUD_BASE_URL=http://${LOCAL_IP}:8086|" \ -e "s|_STRING=.*|_STRING=${DATABASE_URL}|" \ -e "s|DATABASE_URL=.*|DATABASE_URL=${DATABASE_URL}|" \ -e "s|^#OXICLOUD_JWT_SECRET=.*|OXICLOUD_JWT_SECRET=$(openssl rand -hex 32)|" \