Code is posted at github: https://github.com/cdrive/APC-PHP-Reboot-API-Class
Enjoy!
ifconfig en0 | grep ether | awk '{print $2}'
ifconfig en0 ether 68:a8:6d:09:ab:f3
[checkFWDNums]I pass in a list of extensions in standard dial format (SIP/404&SIP/405&SIP/406) type deal, and it gives me back a list of extensions that are not in use, ready to dial. Sweet!
exten => _X.,1,Set(MYEXTEN=${EXTEN:0:3})
exten => _X.,n,GotoIf($[${LEN(foo${SIPPEER(${MYEXTEN},callforward)})}=3]?checkFWDNums,${EXTEN},100:checkFWDNums,${EXTEN},204)
; make sure the phone is not on DND
exten => _X.,100,GotoIf($[${DEVICE_STATE(SIP/${MYEXTEN})} = NOT_INUSE]?checkFWDNums,${ EXTEN},200:checkFWDNums,${ EXTEN},204)
exten => _X.,200,GotoIf($[${LEN(foo${NUMS})}=3]?checkFWDNums,${ EXTEN},201:checkFWDNums,${ EXTEN},203)
exten => _X.,201,Set(NUMS=SIP/${MYEXTEN})
exten => _X.,202,Goto(checkFWDNums,${EXTEN},204)
exten => _X.,203,Set(NUMS=${NUMS}&SIP/${MYEXTEN})
exten => _X.,204,GotoIf($[${LEN(foo${EXTEN})}=6]?checkFWDNums,${ EXTEN},300:checkFWDNums,${ EXTEN:4},1)
exten => _X.,300,Set(SOURCEPRIORITY=$[${SOURCEPRIORITY} + 2])
exten => _X.,301,Goto(${SOURCECONTEXT},${SOURCEEXTEN},${ SOURCEPRIORITY})
http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/8.33-01_Linux_MSM.zipThen install the libs that it needs. Note that we're install libstdc++ x86 even if we're on an x64_86 OS.
yum install net-snmp net-snmp-utils libstdc++.i686 unzip cshYou should be able to log in to your MegaRAID device now via the MSM Console software from Windows! Cool!
On Error Resume Next
Set objShell = WScript.CreateObject("WScript.Shell")
Set objNetwork = WScript.CreateObject("WScript.UPDATE: you also need to set the "start in" parameter on the shortcut to renweb to be C:\RenWebUserData\%USERNAME%. Then you ALSO need to modify the file called 'Parameter' in the RenWeb.com folder, editing the value called START IN DIRECTORY and changing it to J:\z_IT_RenWeb\RenWeb.comNetwork")
objShell.Run "cmd /C ""mkdir c:\RenWebUserData\" & objNetwork.UserName & """", 0, False
' now copy the renweb shortcut into that folder
objShell.Run "cmd /C ""copy c:\RenWebUserData\RenWeb.com.lnk C:\RenWebUserData\" & objNetwork.Username & """", 0, False
' now run the program
objShell.Run "cmd /C ""cd c:\RenWebUserData\" & objNetwork.Username & " && C:\RenWebUserData\" & objNetwork.UserName & "\RenWeb.com.lnk""", 0, False