Commit 62327b5f authored by testing testuser's avatar testing testuser

Adds Seafile, Tunnelblick, no longer runs printer script

parent 552adc32
#!/bin/sh
# Set up a fresh Macbook for IST. Run with sudo
# Set up a fresh Macbook for IST. Run as root user or with sudo
# Moves itself to /User/Shared
cd .. && mv mac-scripts /User/Shared/mac-scripts && cd /User/Shared/mac-scripts
# hostname = "USER INPUT"
read -p "Enter hostname (e.g. 'mnadmn001'): " hostname
......@@ -10,12 +12,12 @@ read -p "Enter your AD admin username: " admuser
# admgroup = "USER INPUT"
read -p "Enter an AD group that should have admin access, if any (besides Domain Admins) - e.g. 'itgrp': " admgroup
# printer = "USER INPUT"
read -p "Enter the building and floor, for default printer selection, if any. E.g. 'u21.eg'" printer
read -p "Enter the building and floor, for default printer selection, if any. E.g. 'i21.eg' for Office West Ground Floor: " printer
# change computer name
scutil --set HostName $hostname
# install xcode command line tools
# install xcode command line tools; probably already installed
xcode-select --install
# update everything
......@@ -33,27 +35,37 @@ systemsetup -setremotelogin on
dsconfigad -groups "Domain Admins"
# add user to admin
dseditgroup -o edit -n /Local/Default -u `whoami` -p -a $username -t user admin
echo "When it asks for 'user password', give the root password.\n"
dseditgroup -o edit -n /Local/Default -u `whoami` -p -a "IST\\$username" -t user admin
# set scripts as executable
chmod 755 com.user.loginscript.plist mountist.sh mac_install_printers.command
# root needs to own all-user LaunchAgents
chown root com.user.loginscript.plist
# loginscript.plist runs mountist.sh for all users on login
cp /Users/Shared/com.user.loginscript.plist /Library/LaunchAgents/com.user.loginscript.plist
cp com.user.loginscript.plist /Library/LaunchAgents/com.user.loginscript.plist
# download, install browser certificates / istwlan cert
# download, install Tunnelblick - install config files?
curl -O https://git.ist.ac.at/support/software/raw/master/Tunnelblick.app.zip
unzip Tunnelblick.app.zip > /dev/null
mv Tunnelblick.app /Applications
rm Tunnelblick.app.zip
# download, install SeaFile
curl -O https://git.ist.ac.at/support/software/raw/master/Seafile Client.app.zip
unzip Seafile Client.app.zip > /dev/null
mv Seafile Client.app /Applications
rm Seafile Client.app.zip
# download, install MacPass
curl -O https://git.ist.ac.at/support/software/raw/master/MacPass.zip
unzip MacPass.zip
unzip MacPass.zip > /dev/null
mv MacPass.app /Applications
rm MacPass.zip
# download printers, install
bash mac_install_printers.command
# when domain-joined adding printers is easy
# ./mac_install_printers.sh
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment