Commit c05a530b authored by testing testuser's avatar testing testuser

All-user LaunchAgent now

parent 8a3789c8
#!/bin/sh
# Download and run the script that will mount network shares.
# Jean St. Laurent, Jozef Reisinger, Liviu Radulescu
# Sets a launch agent for the current user to run mountist.sh
cd /Users/Shared/mac-scripts && git pull
mkdir -p /Users/$1/Library/LaunchAgents
cp /Users/Shared/com.user.loginscript.plist /Users/$1/Library/LaunchAgents/com.user.loginscript.plist
......@@ -33,10 +33,11 @@ systemsetup -setremotelogin on
dsconfigad -groups "Domain Admins"
# add user to admin
dseditgroup -o edit -n /Local/Default -u $admuser -p -a $username -t user admin
dseditgroup -o edit -n /Local/Default -u `whoami` -p -a $username -t user admin
chmod 755 com.user.loginscript.plist copy_imount.sh mountist.sh
defaults write com.apple.loginwindow LoginHook /Users/Shared/mac-scripts/copy_imount.sh
chown root com.user.loginscript.plist
cp /Users/Shared/com.user.loginscript.plist /Library/LaunchAgents/com.user.loginscript.plist
# download fileshare script, set to run on logon
......
......@@ -46,6 +46,10 @@ then
sudo sed -i '' 's/DefaultFinisher: NotInstalled/DefaultFinisher: FinEUPHRATESFBK/g' /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher
fi
# DefaultOptionTray -> 2Cassette
# DefaultFinisher: FinAMURBK
# Add the printers to the MAC. Should we loop through a file? Maybe... let's see
sudo lpadmin -p printer-I01-1st -D "Central Building 1st floor" -L "Central Building 1st floor" -E -v socket://p0117101.ista.local:9100 -P /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher -o printer-is-shared=false
sudo lpadmin -p printer-I01-2nd -D "Central Building 2nd floor" -L "Central Building 2nd floor" -E -v socket://p0117102.ista.local:9100 -P /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher -o printer-is-shared=false
......
......@@ -115,4 +115,5 @@ fi
# Replace the imount script if it is not the current one
# curl -o $IMOUNT_COMMAND http://script.ista.local/mac/$IMOUNT > $LOG_FILE 2>&1
# chmod +x $IMOUNT_COMMAND
cd /Users/Shared/mac-scripts && git pull
sleep 2
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