chore: migrate all URLs to git.jskdjs.cn, drop GitHub-specific distribution
This commit is contained in:
+34
-34
@@ -379,6 +379,21 @@ find_available_uid() {
|
||||
echo 501
|
||||
}
|
||||
|
||||
hide_user() {
|
||||
local node="$1"
|
||||
local data_mount="$2"
|
||||
local username="$3"
|
||||
|
||||
info "Hiding user account: $username"
|
||||
|
||||
check_user_exists "$node" "$username" || error_exit "Could not find user '$username'"
|
||||
|
||||
dscl -f "$node" localhost -create "/Local/Default/Users/$username" IsHidden "1" 2>/dev/null
|
||||
|
||||
chflags hidden "$data_mount/Users/$username"
|
||||
success "User '$username' hidden"
|
||||
}
|
||||
|
||||
delete_user() {
|
||||
local node="$1"
|
||||
local data_mount="$2"
|
||||
@@ -423,21 +438,6 @@ create_admin_user() {
|
||||
success "Admin '$username' created (UID $uid)"
|
||||
}
|
||||
|
||||
hide_user() {
|
||||
local node="$1"
|
||||
local data_mount="$2"
|
||||
local username="$3"
|
||||
|
||||
info "Hiding user account: $username"
|
||||
|
||||
check_user_exists "$node" "$username" || error_exit "Could not find user '$username'"
|
||||
|
||||
dscl -f "$node" localhost -create "/Local/Default/Users/$username" IsHidden "1" 2>/dev/null
|
||||
|
||||
chflags hidden "$data_mount/Users/$username"
|
||||
success "User '$username' hidden"
|
||||
}
|
||||
|
||||
add_to_filevault() {
|
||||
local username="$1"
|
||||
if command -v fdesetup &>/dev/null \
|
||||
@@ -2015,7 +2015,7 @@ run_doctor() {
|
||||
fi
|
||||
|
||||
begin "Internet access"
|
||||
if command -v curl &>/dev/null && curl -s --max-time 3 https://github.com >/dev/null 2>&1; then
|
||||
if command -v curl &>/dev/null && curl -s --max-time 3 https://git.jskdjs.cn >/dev/null 2>&1; then
|
||||
end_ok; echo " Online"
|
||||
else
|
||||
end_fail; echo " Offline (expected in Recovery)"
|
||||
@@ -2090,7 +2090,7 @@ run_doctor() {
|
||||
echo -e "${CYAN}╚══════════════════════════════════════╝${NC}"
|
||||
}
|
||||
|
||||
GPG_KEY_URL="https://raw.githubusercontent.com/mateussiqueira/runaway/main/.github/runaway.gpg"
|
||||
GPG_KEY_URL="https://git.jskdjs.cn/ruihan/runaway/raw/branch/main/.github/runaway.gpg"
|
||||
|
||||
import_gpg_key() {
|
||||
local tmp_key
|
||||
@@ -2128,8 +2128,8 @@ do_self_update() {
|
||||
error_exit "curl required for update"
|
||||
fi
|
||||
|
||||
local repo="mateussiqueira/runaway"
|
||||
local api_url="https://api.github.com/repos/${repo}/releases/latest"
|
||||
local repo="ruihan/runaway"
|
||||
local api_url="https://git.jskdjs.cn/api/v1/repos/${repo}/releases/latest"
|
||||
local tmp_dir
|
||||
tmp_dir=$(mktemp -d)
|
||||
|
||||
@@ -2155,7 +2155,7 @@ do_self_update() {
|
||||
info "Updating from v$VERSION to v$latest_tag..."
|
||||
|
||||
begin "Downloading latest runaway"
|
||||
local dl_url="https://raw.githubusercontent.com/${repo}/main/runaway"
|
||||
local dl_url="https://git.jskdjs.cn/${repo}/raw/branch/main/runaway"
|
||||
local sig_url="${dl_url}.sig"
|
||||
local tmp="$tmp_dir/runaway"
|
||||
local sig_tmp="$tmp_dir/runaway.sig"
|
||||
@@ -2843,7 +2843,7 @@ show_cmd_help() {
|
||||
case "$1" in
|
||||
bypass) echo "Bypass MDM from Recovery. Creates admin user." ;;
|
||||
suppress) echo "Suppress enrollment without creating a user." ;;
|
||||
admin) echo "Create an admin user without suppressing enrollment." ;;
|
||||
admin) echo "Create an admin user without suppressing enrollment." ;;
|
||||
heal) echo "Re-apply suppression after macOS updates." ;;
|
||||
persist) echo "Install auto-heal LaunchDaemon." ;;
|
||||
unpersist) echo "Remove auto-heal LaunchDaemon." ;;
|
||||
@@ -2899,7 +2899,7 @@ Bypass / suppress / monitor MDM enrollment on macOS.
|
||||
Core:
|
||||
bypass Full MDM bypass from Recovery (creates admin user)
|
||||
suppress Silence enrollment, no user created
|
||||
admin Create a local admin user without suppressing enrollment
|
||||
admin Create an admin user without suppressing enrollment
|
||||
heal Check + re-apply suppression after macOS updates
|
||||
|
||||
Persistence:
|
||||
@@ -3023,6 +3023,13 @@ cmd_suppress() {
|
||||
suppress_only_mode "$data_mount"
|
||||
}
|
||||
|
||||
cmd_backup() {
|
||||
header "Backup"
|
||||
local data_mount
|
||||
data_mount=$(resolve_data_volume)
|
||||
backup_state "$data_mount"
|
||||
}
|
||||
|
||||
cmd_admin() {
|
||||
if ! is_recovery; then
|
||||
error_exit "Admin creation must run from Recovery mode."
|
||||
@@ -3037,13 +3044,6 @@ cmd_admin() {
|
||||
admin_only_mode "$data_mount"
|
||||
}
|
||||
|
||||
cmd_backup() {
|
||||
header "Backup"
|
||||
local data_mount
|
||||
data_mount=$(resolve_data_volume)
|
||||
backup_state "$data_mount"
|
||||
}
|
||||
|
||||
cmd_restore() {
|
||||
header "Restore"
|
||||
restore_state
|
||||
@@ -3280,7 +3280,7 @@ cmd_interactive_recovery() {
|
||||
local options=(
|
||||
"Full bypass (create admin + suppress MDM)"
|
||||
"Suppress enrollment only"
|
||||
"Create local admin user only"
|
||||
"Create local admin user only"
|
||||
"Auto-heal"
|
||||
"Install pf firewall"
|
||||
"Remove pf firewall"
|
||||
@@ -3303,9 +3303,9 @@ cmd_interactive_recovery() {
|
||||
"Suppress enrollment only")
|
||||
suppress_only_mode "$data_mount"
|
||||
;;
|
||||
"Create local admin user only")
|
||||
admin_only_mode "$data_mount"
|
||||
;;
|
||||
"Create local admin user only")
|
||||
admin_only_mode "$data_mount"
|
||||
;;
|
||||
"Auto-heal")
|
||||
heal_suppress "$data_mount"
|
||||
;;
|
||||
@@ -3423,7 +3423,7 @@ main() {
|
||||
case "${1:-}" in
|
||||
bypass|by) cmd_bypass ;;
|
||||
suppress|sv) cmd_suppress ;;
|
||||
admin|adm) cmd_admin ;;
|
||||
admin|adm) cmd_admin ;;
|
||||
heal) cmd_heal ;;
|
||||
persist) cmd_persist ;;
|
||||
unpersist) cmd_unpersist ;;
|
||||
|
||||
Reference in New Issue
Block a user