2
# example_script.sh -- example script for vlock,
3
# the VT locking program for linux
5
# This program is copyright (C) 2007 Frank Benkstein, and is free software. It
6
# comes without any warranty, to the extent permitted by applicable law. You
7
# can redistribute it and/or modify it under the terms of the Do What The Fuck
8
# You Want To Public License, Version 2, as published by Sam Hocevar. See
9
# http://sam.zoy.org/wtfpl/COPYING for more details.
13
# Declare dependencies. Please see PLUGINS for their meaning. Empty
14
# dependencies can be left out.
24
# The name of the hook that should be executed is read as a string from
25
# stdin. This function should only exit when stdin hits end-of-file.
27
while read hook_name ; do
28
case "${hook_name}" in
30
# do something here that should happen at the start of vlock
33
# do something here that should happen at the end of vlock
36
# start a screensaver type action here
39
# abort a screensaver type action here
45
# Everything below is boilerplate code that shouldn't need to be changed.
47
if [ $# -ne 1 ] ; then
48
echo >&2 "Usage: $0 <command>"
75
echo >&2 "$0: unknown command '$1'"