1) ks jamf 懈载 js描述文件,把 用户电脑的静态组数据发送到 aaaa,,,卸载 jamf,,,并open 一下,, js描述文件
2) 重启,到描述文件面板 安装描述文件
3) 到 js 的 描述文件的 self service 执行同步用户电脑的静态组(获取aaa.bbb.com的数据),,和self service 再执行一下 加密
delete_jamf_from_ks
#!/bin/bash
#
status=1
mac=""
ifconfig en0 | grep -F "10." | grep -F "255"
if [ $? = 0 ]; then
status=0
mac=$(ifconfig en0 | grep ether | awk '{print $NF}')
else
ifconfig en1 | grep -F "10." | grep -F "255"
if [ $? = 0 ]; then
status=0
mac=$(ifconfig en1 | grep ether | awk '{print $NF}')
fi
fi
if [ status = 0 ] && [ $mac != "" ]; then
fi
open "${HOME}/Desktop/enrollmentProfile.mobileconfig"
(/usr/bin/osascript -e 'display dialog "己卸载ksjamf描述文件,请至系统偏好设置处安装js描述文件,安装后请到js的 self service 中 双击 update_group_to_js_jamf 同步ks的jamf组到js!" buttons {"OK"} default button "OK" ')
update_group_to_js_jamf
#!/bin/bash
#
ifconfig en0 | grep -F "10." | grep -F "255"
if [ $? = 0 ]; then
status=0
mac=$(ifconfig en0 | grep ether | awk '{print $NF}')
fi
ifconfig en1 | grep -F "10." | grep -F "255"
if [ $? = 0 ]; then
status=0
mac1=$(ifconfig en1 | grep ether | awk '{print $NF}')
fi
if [ $result = "js_exists" ]; then
(/usr/bin/osascript -e 'display dialog "本电脑的jsjamf组己存在!" buttons {"OK"} default button "OK" ')
exit 0
elif [ $result = "ok" ]; then
(/usr/bin/osascript -e 'display dialog "本电脑的ksjamf组己同步到js!" buttons {"OK"} default button "OK" ')
exit 0
elif [ $result = "ks_not_exists" ]; then
(/usr/bin/osascript -e 'display dialog "本电脑的ksjamf组已删除,无法同步!" buttons {"OK"} default button "OK" ')
fi
http://aaa.bbb.com/get_group_from_ks_jamf?get=1&mac=${mac} >/dev/null
http://aaa.bbb.com/update_group_to_js_jamf?update=1&mac=${mac}