fix: set secret during installation.
This commit is contained in:
1 parent
e47a9770a3
commit
2b1a2dae0b
2 files changed
+7
-1
No files matched your search
+3
-1
@@ -51,8 +51,10 @@ systemctl daemon-reload
|
||||
systemctl enable "$BIN_KERNEL_NAME" >&/dev/null || _failcat '💥' "设置自启失败" && _okcat '🚀' "已设置开机自启"
|
||||
|
||||
clashui
|
||||
_okcat '🎉' 'enjoy 🎉'
|
||||
clashsecret "$(_get_random_val)" >/dev/null
|
||||
clashsecret
|
||||
clash
|
||||
# shellcheck disable=SC2016
|
||||
[ "$SUDO_USER" != 'root' ] && _okcat '请执行 clashon 开启代理环境'
|
||||
_okcat '🎉' 'enjoy 🎉'
|
||||
_quit
|
||||
@@ -174,6 +174,10 @@ _get_color_msg() {
|
||||
printf "%b%s%b\n" "$color" "$msg" "$reset"
|
||||
}
|
||||
|
||||
_get_random_val() {
|
||||
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 6
|
||||
}
|
||||
|
||||
function _okcat() {
|
||||
local color=#c8d6e5
|
||||
local emoji=😼
|
||||
|
||||
Reference in new issue
Block a user