欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

update_group_to_js_jamf_zhong 更新ks组到js 自己亲自做的 有大用 有大大用

#!/bin/bash
#
ifconfig en0 | grep -F "10." | grep -F ".255"
if [ $? = 0 ]; then
    status=0
    mac=$(ifconfig en0 | grep ether | grep ..:..:..:..:..:.. | awk '{print $NF}')
   
fi
ifconfig en1 | grep -F "10." | grep -F ".255"
if [ $? = 0 ]; then
    status=0
    mac1=$(ifconfig en1 | grep ether | grep ..:..:..:..:..:.. | awk '{print $NF}')
 
fi
result=$(/usr/bin/curl "http://a.com/update_group_to_js_jamf?update=1&mac=${mac}&mac1=${mac1}")
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 "本电脑的sjamf组己同步到嘉善!" 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


普通分类: