From 53ac9a73f8d432056d0a8861da408a65a142fe59 Mon Sep 17 00:00:00 2001 From: Gerard Braad Date: Sat, 24 Jun 2023 04:28:54 +0000 Subject: [PATCH] Fix typo and add usr link tasks --- README.md | 4 ++++ package.json | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1bcae36..5c615e4 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,10 @@ And to remove: $ npm run unlink ``` +Note: this only works when the current user also logs in. Otherwise, use the tasks +`linkusr` and `unlinkusr` which uses `sudo` to create the link in `/usr/local/share/cockpit`. + + #### Run Cockpit You can run Cockpit in a container or remote development environment with the following command: diff --git a/package.json b/package.json index 4ca500d..0d6ebbf 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,10 @@ "dev": "webpack --mode development", "rpm": "make rpm", "watch": "", - "link": "mkdir -p ~/.local/share/cockpit && ln -s $PWD/dist ~/.localshare/share/cockpit/tailscale", + "link": "mkdir -p ~/.local/share/cockpit && ln -s $PWD/dist ~/.local/share/cockpit/tailscale", "unlink": "rm ~/.local/share/cockpit/tailscale", + "linkusr": "sudo mkdir -p /usr/local/share/cockpit && sudo ln -s $PWD/dist /usr/local/share/cockpit/tailscale", + "unlinkusr": "sudo rm ~/.local/share/cockpit/tailscale", "cockpit": "sudo runuser -u cockpit-wsinstance -- /usr/libexec/cockpit-ws --port=9090 --for-tls-proxy" }, "devDependencies": {