Difference between revisions of "AcceptableUsePolicy.bash"

From CDOT Wiki
Jump to: navigation, search
(Created page with '#!/bin/bash # acceptableUsePolicy.bash # Purpose: To ensure users confirm computer lab's Acceptable use policy... # Author: Murray Saul # Date Created: October 27, 2009 # Note...')
 
 
Line 1: Line 1:
#!/bin/bash
+
<pre>#!/bin/bash
  
 
# acceptableUsePolicy.bash
 
# acceptableUsePolicy.bash
Line 40: Line 40:
  
 
# End of bash shell script
 
# End of bash shell script
 +
</pre>

Latest revision as of 08:46, 27 October 2009

#!/bin/bash

# acceptableUsePolicy.bash
# Purpose: To ensure users confirm computer lab's Acceptable use policy... 
# Author: Murray Saul
# Date Created: October 27, 2009

# Note: Commenting (like this)is good to help others understand how shell script works...
#       Place a "#" symbol before your comments, or text will be mistaken for a command...
#
# Note: "zenity" command is used to provide a graphical dialog box to
#       prompt the user for a response.
#
# If user: clicks CANCEL, or closes dialog box, or does NOT click OK in 20 seconds,
#          then user is logged off system. The "||" symbol indicate perform if
#          previous command was unsuccessful...
#
# If user: clicks OK, then session can continue...
#
# Issue command chmod 755 shellScriptName             to make script executable...
#
# This shell script can be automatically run by adding it to "Startup Applications:"
# Click SYSTEM -> PREFERENCES -> STARTUP APPLICATIONS
# Add this shell script to run upon startup...

zenity --title "Computer Lab Usage Policy"  --question --text "By clicking OK, I agree to abide by the following\nAcceptable Use Policy for [organization name]'s Computer Lab:

   » No viewing or downloading offensive or
      sexually explicit material.

   » No illegal activity allowed on this premises.

   » Users shall not copy or use copyrighted media
     (including text, audio, video, software, etc)
      except as permitted by law or by the owner
      of the copyright.

Please click OK within the next 20 seconds,
or CANCEL to logout..." --timeout=20 || gnome-session-save --force-logout

# End of bash shell script