mirror of
https://github.com/PurpleComputing/mdmscripts.git
synced 2026-02-16 03:32:15 +00:00
Create MDM-Script-Pull.md
This commit is contained in:
24
MDM-Script-Pull.md
Normal file
24
MDM-Script-Pull.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Custom Command Template / Script Template
|
||||
```
|
||||
## PURPLE GITHUB PULL TEMPLATE ##
|
||||
##-------------------------------##
|
||||
## SET PERMISSIONS ##
|
||||
chmod 777 -R /tmp
|
||||
##-------------------------------##
|
||||
## SET VARIABLES ##
|
||||
SCRIPTNAME=fix-outlook-spotlight.sh
|
||||
REPO=troubleshooting
|
||||
BRANCH=main
|
||||
##-------------------------------##
|
||||
## START SCRIPT ##
|
||||
##-------------------------------##
|
||||
# CLEAN UP PREVIOUS FILE
|
||||
rm -rf /tmp/$SCRIPTNAME
|
||||
# DOWNLOAD LATEST FILE
|
||||
curl -o /tmp/$SCRIPTNAME https://raw.githubusercontent.com/PurpleComputing/$REPO/$BRANCH/$SCRIPTNAME
|
||||
# GIVE EXECUTE PERMISSIONS
|
||||
sudo -u $(stat -f "%Su" /dev/console) /bin/sh <<'END'
|
||||
chmod +x /tmp/$SCRIPTNAME
|
||||
# RUN AS CURRENT USER
|
||||
/tmp/$SCRIPTNAME
|
||||
```
|
||||
Reference in New Issue
Block a user