6
51
502
论坛分享达人
# !/bin/bash MBPIP="192.168.8.82" parm1=$1 if [ $parm1 == "lockScreen" ]; then if ping -c 1 -W 1 $MBPIP >/dev/null 2>&1 ; then ssh -i /config/id_rsa -o StrictHostKeyChecking=no -q walt@$MBPIP 'osascript -e "tell app \"System Events\" to sleep" >/dev/null 2>&1' #ssh -i /config/id_rsa -o StrictHostKeyChecking=no -q walt@$MBPIP 'osascript -e "tell application \"System Events\" to keystroke \"q\" using {control down, command down}" 2>/dev/null' fi fi
shell_command: # mac book pro lock_mbp: 'bash /config/shell/MBPControl.sh lockScreen'
使用道具 举报
4
338
2698
金牌会员
14
1543
5022
论坛元老
2
5
124
注册会员
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )
GMT+8, 2025-5-16 14:12 , Processed in 0.346991 second(s), 26 queries .
Powered by Discuz! X3.5
© 2001-2025 Discuz! Team.