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": {