NAME
jslaunchd - daemon wrapper for jslaunch
SYNOPSIS
jslaunch [start|restart|stop|status] [-f inputfile]
DESCRIPTION
jslaunchd is a utility that will execute jslaunch(1) with the correct command line parameters taken from an input file, for which the default is /etc/jslaunchd.conf. This way, the command line parameters needn't be supplied every time jslaunch is run, status information can be obtained and jslaunch can be stopped/restarted with a simple command.
jslaunchd will start jslaunch(1) with a file lock on /var/lock/jslaunch, (or a file specified in jslaunchd.conf) so that no two instances will be run with jslaunchd, and that status information can be obtained. (This status information just indicates whether jslaunch is running or not). Because of this lock file, jslaunchd can only be run as superuser.
OPTIONS
- start
-
Run jslaunch with parameters taken either from /etc/jslaunchd.conf or from the file specified with the -f option
- stop
-
Raise a SIGINT signal to the jslaunch started with jslaunchd which will cause it to terminate.
- restart
-
Do the stop and start actions succesively.
- status
-
Check whether a jslaunch started by jslaunchd is running.
- -f inputfile
-
Read the starting parameters from inputfile instead of /etc/jslaunchd.conf
INPUT FILE SPECIFICATION
jslaunchd will take an input file ( /etc/jslaunchd.conf by default), which contains the shell commands to be run when specific joystick button combination are pressed, in addition to some optional parameters. Each line contains either a command, a parameter setting, or nothing. # indicates comment. The first word on a noncomment line indicates the type of setting; this can be one of:
- run [1][2][3][4] [shell command]
-
Indicates that the [1][2][3][4] joystick button combination (see jslaunch(1) on how to give joystick button specification) executes the shell command (which doesn't have to be quoted).
- lock [lockfile]
-
Sets the lock file for jslaunch to [lockfile].
- poll [time]
-
Sets the poll time in milliseconds
- wait [time]
-
Sets the wait time (see jslaunchd(1) ) in milliseconds.
- ignore [1][2][3][4]
-
Lets jslaunch ignore the buttons specified.
- nodaemon
-
Will let jslaunchd run jslaunch as an ordinary program, not as a daemon; it will, therefore have to be terminated by ^C.
EXAMPLE
# Sample /etc/jslaunchd.conf # # Run '/sbin/shutdown -h now' when all four # joystick buttons are pressed run 1234 /sbin/shutdown -h now # Run 'killall X' when both buttons 3 and 4 are pressed run 34 killall X # Run 'ppp on' when button 1 is pressed run 1 ppp on # Run 'ppp off' when button 2 is pressed run 2 ppp off # Use /var/lock/jslaunch as a lock file (this is also the default) lock /var/lock/jslaunch # Set polling interval to 250 ms. poll 250 # Set wait time to 200 ms. wait 200
SEE ALSO
VERSION
2.0, august 1998
BUGS
Please contact me if you find any
AUTHOR
Sander Pronk <[email protected]>