From 28edf4af2ede33bfbd9222028c27ba82cc0a9396 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Sun, 10 May 2020 02:58:34 -0400 Subject: [PATCH] Add systemd user service to .deb and .rpm --- ci/README.md | 2 ++ ci/build/code-server.service | 11 +++++++++++ ci/build/nfpm.yaml | 1 + 3 files changed, 14 insertions(+) create mode 100644 ci/build/code-server.service diff --git a/ci/README.md b/ci/README.md index a20c00bdc..b09545246 100644 --- a/ci/README.md +++ b/ci/README.md @@ -78,6 +78,8 @@ You can disable minification by setting `MINIFY=`. - Used to configure [nfpm](https://github.com/goreleaser/nfpm) to generate .deb and .rpm - [./build/code-server-nfpm.sh](./build/code-server-nfpm.sh) - Entrypoint script for code-server for .deb and .rpm +- [./build/code-server.service](./build/code-server.service) + - systemd user service packaged into the debs and rpms - [./build/release-github-draft.sh](./build/release-github-draft.sh) (`yarn release:github-draft`) - Uses [hub](https://github.com/github/hub) to create a draft release with a template description - [./build/release-github-assets.sh](./build/release-github-assets.sh) (`yarn release:github-assets`) diff --git a/ci/build/code-server.service b/ci/build/code-server.service new file mode 100644 index 000000000..414f54515 --- /dev/null +++ b/ci/build/code-server.service @@ -0,0 +1,11 @@ +[Unit] +Description=code-server +After=network.target + +[Service] +Type=exec +ExecStart=/usr/bin/code-server +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/ci/build/nfpm.yaml b/ci/build/nfpm.yaml index efea4ece0..c290eb18b 100644 --- a/ci/build/nfpm.yaml +++ b/ci/build/nfpm.yaml @@ -13,4 +13,5 @@ license: "MIT" bindir: "/usr/bin" files: ./ci/build/code-server-nfpm.sh: /usr/bin/code-server + ./ci/build/code-server.service: /usr/lib/systemd/user/code-server.service ./release-static/**/*: "/usr/lib/code-server/"