diff --git a/Dockerfile-integration b/Dockerfile-integration index 063cd1eb..54543b3a 100644 --- a/Dockerfile-integration +++ b/Dockerfile-integration @@ -1,4 +1,5 @@ FROM ubuntu:jammy as builder +ENV NODE_VERSION=20.13.1 RUN apt-get update && apt-get install -y curl build-essential debhelper devscripts pkg-config libssl-dev zip RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y RUN mkdir /build @@ -8,7 +9,9 @@ COPY Cargo.toml /build/Cargo.toml COPY Cargo.lock /build/Cargo.lock COPY build.rs /build/build.rs COPY db_v2.sqlite3 /build/db_v2.sqlite3 -RUN . /root/.cargo/env && cd /build \ +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \ + && . /root/.nvm/nvm.sh && nvm install ${NODE_VERSION} && nvm use ${NODE_VERSION} \ + && . /root/.cargo/env && cd /build \ && cargo update -p sctgdesk-api-server \ && DATABASE_URL=sqlite://$(pwd)/db_v2.sqlite3 cargo build --release RUN mkdir -p /build/ubuntu-jammy/bin \ diff --git a/debian/rustdesk-server-hbbs.postinst b/debian/rustdesk-server-hbbs.postinst index b53d28db..c2c58172 100644 --- a/debian/rustdesk-server-hbbs.postinst +++ b/debian/rustdesk-server-hbbs.postinst @@ -10,6 +10,75 @@ fi case "$1" in configure|abort-upgrade|abort-deconfigure|abort-remove) mkdir -p /var/lib/rustdesk-server/ + # if /var/lib/rustdesk-server/oauth2.toml does not exist, create it + if [ ! -f /var/lib/rustdesk-server/oauth2.toml ]; then + cat > /var/lib/rustdesk-server/oauth2.toml < /var/lib/rustdesk-server/s3config.toml </dev/null || true if deb-systemd-helper --quiet was-enabled "${SERVICE}"; then deb-systemd-invoke enable "${SERVICE}" >/dev/null || true diff --git a/systemd/rustdesk-hbbs.service b/systemd/rustdesk-hbbs.service index 248a6a41..c043b1e6 100644 --- a/systemd/rustdesk-hbbs.service +++ b/systemd/rustdesk-hbbs.service @@ -6,6 +6,9 @@ Description=Rustdesk Signal Server Type=simple LimitNOFILE=1000000 ExecStart=/usr/bin/hbbs +Environment="OAUTH2_CREATE_USER=1" +Environment="S3CONFIG_FILE=s3config.toml" +Environment="OAUTH2_CONFIG_FILE=oauth2.toml" WorkingDirectory=/var/lib/rustdesk-server/ User= Group=