跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

11-colorterm-environment.sh

38 行 · 986 B历史下载
1#!/bin/sh
2
3# SPDX-FileCopyrightText: Copyright The Lima Authors
4# SPDX-License-Identifier: Apache-2.0
5
6set -eux
7
8if [ -d /etc/ssh/sshd_config.d ]; then
9 if [ -e /etc/ssh/sshd_config.d/10-acceptenv-colorterm.conf ]; then
10 exit 0
11 fi
12
13 # accept any incoming COLORTERM environment variable
14 echo "AcceptEnv COLORTERM" >/etc/ssh/sshd_config.d/10-acceptenv-colorterm.conf
15elif [ -e /etc/ssh/sshd_config ]; then
16 if grep -q "COLORTERM" /etc/ssh/sshd_config; then
17 exit 0
18 fi
19
20 # accept any incoming COLORTERM environment variable
21 sed -i 's/^AcceptEnv LANG LC_\*$/AcceptEnv COLORTERM LANG LC_*/' /etc/ssh/sshd_config
22else
23 exit 0
24fi
25
26if [ -f /sbin/openrc-run ]; then
27 if [ -f etc/init.d/ssh ]; then
28 rc-service --ifstarted ssh reload
29 elif [ -f etc/init.d/sshd ]; then
30 rc-service --ifstarted sshd reload
31 fi
32elif command -v systemctl >/dev/null 2>&1; then
33 if systemctl -q is-active ssh; then
34 systemctl reload ssh
35 elif systemctl -q is-active sshd; then
36 systemctl reload sshd
37 fi
38fi