~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to doc/man/scripts.rst

  • Committer: William Grant
  • Date: 2009-12-10 09:47:38 UTC
  • Revision ID: grantw@unimelb.edu.au-20091210094738-pa4yrieyb9ynigej
Clean up and correct the admin scripts documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
Admin scripts
22
22
*************
23
23
 
24
 
IVLE has a number of Admin scripts to configure IVLE or for functionality not  
25
 
directly in the web application.
 
24
IVLE has a number of admin scripts for uncommon configuration or other
 
25
functionality not available in the web application.
26
26
 
27
 
Most of these script are required to be run as root.
 
27
Most of these scripts must be run as root.
28
28
 
29
29
ivle-addexercise
30
30
----------------
33
33
 
34
34
:program:`ivle-addexercise <EXERCISE>`
35
35
 
36
 
Adds an XML encoded exercise to the IVLE database.
 
36
Adds an XML encoded exercise to the IVLE database. This is primarily
 
37
for importing exercises that pre-date the database storage system.
 
38
 
 
39
The exercise's name will be set to the complete path specified on the
 
40
command line -- keep this in mind when choosing a working directory.
37
41
 
38
42
.. cmdoption:: <EXERCISE>
39
43
 
46
50
 
47
51
:program:`ivle-adduser [OPTIONS] <LOGIN> <FULLNAME>`
48
52
 
49
 
Script to create a new user.
 
53
Creates a new user in the database. On-disk structures (jails and
 
54
Subversion repositories) will be created upon first login.
50
55
 
51
56
.. FIXME: "This can also be done through the administration interface."
52
57
    (Not yet!)
53
58
 
54
 
This script wraps common.makeuser. It also creates a unix account which 
55
 
common.makeuser does not. (This script may not be appropriate for production 
56
 
on a multi-node environment)
57
59
 
58
60
.. cmdoption:: <LOGIN>
59
61
 
60
 
    The login name of the new user
 
62
    Login name of the new user
61
63
 
62
64
.. cmdoption:: <FULLNAME>
63
65
 
64
 
    The full name of the user
 
66
    Full name of the user
65
67
 
66
68
.. cmdoption:: -p <PASSWORD>, --password <PASSWORD>
67
69
 
68
 
    Cleartext password
 
70
    Cleartext password. If omitted, external authentication mechanisms
 
71
    will be tried.
69
72
 
70
73
.. cmdoption:: -n <NICK>, --nick <NICK>
71
74
 
81
84
 
82
85
.. cmdoption:: --admin
83
86
 
84
 
    Give the user full administrative privileges
 
87
    Give the user global IVLE administrative privileges
85
88
 
86
89
 
87
90
ivle-buildjail
91
94
 
92
95
:program:`ivle-buildjail [OPTIONS]`
93
96
 
 
97
Creates or updates the IVLE jail template. 
 
98
 
94
99
.. cmdoption:: -r, --recreate
95
100
 
96
101
    Completely recreate the jail - don't just update its IVLE code.
106
111
 
107
112
.. cmdoption:: -m <MIRROR>, --mirror <MIRROR>
108
113
 
109
 
    Sets the APT mirror.
 
114
    Sets the APT mirror. May also be specified in the ``jail/mirror``
 
115
    config key.
110
116
 
111
117
 
112
118
ivle-cloneworksheets
117
123
:program:`ivle-cloneworksheets <OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER> 
118
124
<NEWSUBJECTCODE> <NEWYEAR> <NEWSEMESTER>`
119
125
 
120
 
Populates the subject specified by ``<NEWSUBJECTCODE> <NEWYEAR> 
121
 
<NEWSEMESTER>`` with a copy of the worksheets from the subject specified by 
 
126
Populates the offering specified by ``<NEWSUBJECTCODE> <NEWYEAR> 
 
127
<NEWSEMESTER>`` with a copy of the worksheets from the offering specified by 
122
128
``<OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER>``.
123
129
 
124
130
 
129
135
 
130
136
:program:`ivle-config [ARG1] [ARG2] ...`
131
137
 
132
 
Configures IVLE with machine-specific details, most notably, various paths.
 
138
Configures IVLE with machine-specific details, most notably various paths.
133
139
Either prompts the administrator for these details or accepts them as
134
 
command-line args.
 
140
command line arguments.
135
141
 
136
 
Command-line arguments may be any of the :ref:`configuration option 
 
142
Command line arguments may be any of the :ref:`configuration option 
137
143
<ref-configuration-options>` used in :file:`ivle.conf`. They are provided in 
138
144
the form of :samp:`--{section}/{subsection}/{property} {VALUE}` such as 
139
145
``--urls/root ivle.org`` or ``--media/externals/jquery 
140
146
/usr/share/javascript/jquery``.
141
147
 
142
 
Automatically creates the file :file:`/etc/ivle.conf`.
 
148
Creates or updates :file:`/etc/ivle/ivle.conf` with the selected values,
 
149
and overwrites :file:`/etc/ivle/plugins.d/000default` with the latest
 
150
default plugin list.
143
151
 
144
152
 
145
153
ivle-createdatadirs
149
157
 
150
158
:program:`ivle-createdatadirs`
151
159
 
152
 
Creates an IVLE data hierarchy if it does not already exist.
 
160
Creates the IVLE data hierarchy (by default under :file:`/var/lib/ivle`) if
 
161
it does not already exist.
153
162
 
154
163
 
155
164
ivle-enrol
159
168
 
160
169
:program:`ivle-enrol <LOGIN> <SUBJECTCODE> <YEAR> <SEMESTER> [ROLE]`
161
170
 
162
 
Script to enrol a user in an offering.
 
171
Enrols a user in an offering.
 
172
 
 
173
.. note::
 
174
    Users may also be enrolled from the offering administration panel
 
175
    in the web interface.
163
176
 
164
177
.. cmdoption:: <LOGIN>
165
178
 
166
 
    The login of the user to enrol.
 
179
    Login of the user to enrol
167
180
 
168
181
.. cmdoption:: <SUBJECTCODE>
169
182
 
170
 
    The subject code of the offering.
 
183
    Subject code
171
184
 
172
185
.. cmdoption:: <YEAR>
173
186
 
174
 
    The year of the offering.
 
187
    Offering year
175
188
 
176
189
.. cmdoption:: <SEMESTER>
177
190
 
178
 
    The semester of the offering
 
191
    Offering semester
179
192
 
180
193
.. cmdoption:: [ROLE]
181
194
 
182
 
    Set the role of the user. Should be one of 'student' (default), 'tutor' or 
 
195
    Role of the user. Should be one of 'student' (default), 'tutor' or
183
196
    'lecturer'.
184
197
 
185
198
 
190
203
 
191
204
:program:`ivle-enrolallusers`
192
205
 
193
 
Script to add enrolments for all users on the system.
 
206
Adds enrolments for all users on the system.
194
207
Pulls from the configured :ref:`subject pulldown module 
195
208
<ref-subject-pulldown-modules>` the subjects each student
196
209
is enrolled in, and adds enrolments to the database.
197
210
Does not remove any enrolments.
198
211
 
199
 
Requires root to run.
 
212
.. note::
 
213
    Pulldown modules are consulted for each user each time they log in,
 
214
    so use of this script may not be required.
200
215
 
201
216
.. cmdoption:: -u <LOGIN>, --user <LOGIN>
202
217
 
206
221
 
207
222
    Print out the details of each enrolment.
208
223
 
209
 
.. cmdoption:: -y, --year
210
 
 
211
 
    If specified, year to make enrolments for (default is the current year)
212
 
 
213
224
 
214
225
ivle-fetchsubmissions
215
226
---------------------
216
227
 
217
228
.. program:: ivle-fetchsubmissions
218
229
 
219
 
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECTNAME>`
 
230
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECT>`
220
231
 
221
232
Retrieves all submissions for a given project. Places each submission in its 
222
 
own directory, in a subdirectory of '.'. Any errors are reported to stderr 
 
233
own subdirectory of the current directory. Any errors are reported to stderr
223
234
(otherwise is silent).
224
235
 
225
 
Requires root to run.
 
236
.. note::
 
237
    Since this script accesses Subversion repositories through the
 
238
    filesystem, it must be run on the master server.
226
239
 
227
240
.. cmdoption:: <SUBJECT>
228
241
 
229
 
    The short name given to the subject
 
242
    Subject short (URL) name
230
243
 
231
244
.. cmdoption:: <PROJECTNAME>
232
245
 
233
 
    The name of the project to retrieve.
 
246
    Project short (URL) name
234
247
 
235
248
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
236
249
 
237
 
    Semester of the subject's offering (eg. 2009/1). Defaults to the currently 
 
250
    Semester of the offering (eg. 2009/1). Defaults to the currently
238
251
    active semester.
239
252
 
240
253
.. cmdoption:: -d <PATH>, --dest <PATH>
241
254
 
242
 
    Destination directory (defaults to '.') to place submissions. Will create 
243
 
    subdirectories in this directory of the form 
244
 
    ``subject/year/semester/project``.
 
255
    Destination directory (defaults to the current directory) in
 
256
    which to place submissions. Will create subdirectories in this
 
257
    directory of the form ``subject/year/semester/project``.
245
258
 
246
259
.. cmdoption:: -z, --zip
247
260
 
249
262
 
250
263
.. cmdoption:: -v, --verbose
251
264
 
252
 
    Print out the name of each submission as it is extracted.
 
265
    Print the name of each submission as it is extracted.
253
266
 
254
267
.. cmdoption:: --no-txt
255
268
 
263
276
 
264
277
:program:`ivle-listusers [OPTIONS]`
265
278
 
266
 
Gets a list of all users in the IVLE database.
267
 
 
268
 
Requires root to run.
 
279
Lists all users in the IVLE database.
269
280
 
270
281
.. cmdoption:: -n, --names
271
282
 
272
 
    Only prints the logins of users
 
283
    Print only each user's login name
273
284
 
274
285
 
275
286
ivle-marks
281
292
 
282
293
Reports each student's marks for a given subject offering.
283
294
 
284
 
Requires root to run.
285
 
 
286
295
.. cmdoption:: <SUBJECT>
287
296
 
288
 
    The short name given to the subject
 
297
    Subject short (URL) name
289
298
 
290
299
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
291
300
 
292
 
    Semester of the subject's offering (eg. 2009/1). Defaults to the currently 
 
301
    Semester of the offering (eg. 2009/1). Defaults to the currently
293
302
    active semester.
294
303
 
295
304
.. cmdoption:: -c <CUTOFF>, --cutoff <CUTOFF>
309
318
 
310
319
.. note::
311
320
 
312
 
    Administrators should not be required to manually run this script for 
313
 
    regular operation.  IVLE will automatically mount user's jails on demand.
314
 
 
315
 
Requires root to run.
 
321
    Administrators should not need to manually run this script for regular
 
322
    operation.  IVLE will automatically mount users' jails on demand.
316
323
 
317
324
.. cmdoption:: -v, --verbose
318
325
 
319
 
    Prints the details of each user's jail being mounted/unmounted
 
326
    Print a message for each mount or unmount.
320
327
 
321
328
.. cmdoption:: -u, --unmount
322
329
 
330
337
 
331
338
:program:`ivle-refreshfilesystem`
332
339
 
333
 
Refresh parts of the filesystem that are generated from the database.
334
 
 
335
 
In particular, the Subversion authorisation files are rewritten.
 
340
Refresh parts of the filesystem to match the database.
 
341
 
 
342
In particular:
 
343
 - all jails are rebuilt
 
344
 - missing user jails are created
 
345
 - missing user and group Subversion repositories are created
 
346
 - jails for missing users are removed
 
347
 - Subversion repositories for missing users or groups are removed
 
348
 - the Subversion password file is updated
 
349
 - the Subversion authorisation files are rewritten
 
350
 
 
351
.. warning::
 
352
    Due to the full jail rebuilds, existing jail mounts may be broken
 
353
    after this script has run. To recover from this situation, use
 
354
    ``ivle-mountallusers`` to unmount all of the jails.
 
355
 
 
356
.. note::
 
357
    Jails and Subversion repositories are not entirely removed. They
 
358
    can be found in a timestamped directory alongside their parent.
336
359
 
337
360
 
338
361
ivle-remakeuser
344
367
 
345
368
:program:`ivle-remakeuser [OPTIONS] -a`
346
369
 
347
 
Rebuilds the Jail of a user or all users in IVLE. This will not delete the 
348
 
data of the users being rebuilt.
349
 
 
350
 
Requires root to run.
 
370
Rebuilds the jail of a single user or of all users in IVLE. This will
 
371
retain all user data, but recreate the rest of the hierarchy and
 
372
internal configuration files.
351
373
 
352
374
.. cmdoption:: <USER>
353
375
 
354
 
    Login of the user whose Jail will be rebuilt.
355
 
 
356
 
.. cmdoption:: -v, --verbose
357
 
 
358
 
    Prints the details of each user's jail being remade.
 
376
    Login of the user whose jail should be rebuilt
359
377
 
360
378
.. cmdoption:: -a, --all
361
379
 
362
 
    Rebuild all users Jails.
 
380
    Rebuild the jail of every user
 
381
 
 
382
.. cmdoption:: -v, --verbose
 
383
 
 
384
    Print a message as each user's jail is remade
363
385
 
364
386
 
365
387
ivle-showenrolment
370
392
:program:`ivle-showenrolment <USER>`
371
393
 
372
394
Shows the enrolments of a user. Prints subject code, subject name, year, 
373
 
semester and role the user has in each subject they are enrolled in.
374
 
 
375
 
Requires root to run.
 
395
semester and the held role for each subject in which they are enrolled.
376
396
 
377
397
.. cmdoption:: <USER>
378
398
 
379
 
    Login of the user to view enrolments details.
 
399
    Login of the user