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

« back to all changes in this revision

Viewing changes to doc/man/scripts.rst

  • Committer: David Coles
  • Date: 2009-07-21 02:19:56 UTC
  • mto: (1281.1.8 aufsless)
  • mto: This revision was merged to the branch mainline in revision 1300.
  • Revision ID: coles.david@gmail.com-20090721021956-c1jiwu7fhi2dna1g
Updated to work on bind mounts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.. IVLE - Informatics Virtual Learning Environment
2
 
   Copyright (C) 2007-2009 The University of Melbourne
3
 
 
4
 
.. This program is free software; you can redistribute it and/or modify
5
 
   it under the terms of the GNU General Public License as published by
6
 
   the Free Software Foundation; either version 2 of the License, or
7
 
   (at your option) any later version.
8
 
 
9
 
.. This program is distributed in the hope that it will be useful,
10
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
   GNU General Public License for more details.
13
 
 
14
 
.. You should have received a copy of the GNU General Public License
15
 
   along with this program; if not, write to the Free Software
16
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17
 
 
18
 
.. _ref-admin-scripts:
19
 
 
20
 
*************
21
 
Admin scripts
22
 
*************
23
 
 
24
 
IVLE has a number of admin scripts for uncommon configuration or other
25
 
functionality not available in the web application.
26
 
 
27
 
Most of these scripts must be run as root.
28
 
 
29
 
ivle-addexercise
30
 
----------------
31
 
 
32
 
.. program:: ivle-addexercise
33
 
 
34
 
:program:`ivle-addexercise <EXERCISE>`
35
 
 
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.
41
 
 
42
 
.. cmdoption:: <EXERCISE>
43
 
 
44
 
    The XML file containing the exercise to be uploaded.
45
 
 
46
 
ivle-adduser
47
 
------------
48
 
 
49
 
.. program:: ivle-adduser
50
 
 
51
 
:program:`ivle-adduser [OPTIONS] <LOGIN> <FULLNAME>`
52
 
 
53
 
Creates a new user in the database. On-disk structures (jails and
54
 
Subversion repositories) will be created upon first login.
55
 
 
56
 
.. FIXME: "This can also be done through the administration interface."
57
 
    (Not yet!)
58
 
 
59
 
 
60
 
.. cmdoption:: <LOGIN>
61
 
 
62
 
    Login name of the new user
63
 
 
64
 
.. cmdoption:: <FULLNAME>
65
 
 
66
 
    Full name of the user
67
 
 
68
 
.. cmdoption:: -p <PASSWORD>, --password <PASSWORD>
69
 
 
70
 
    Cleartext password. If omitted, external authentication mechanisms
71
 
    will be tried.
72
 
 
73
 
.. cmdoption:: -n <NICK>, --nick <NICK>
74
 
 
75
 
    Display name (defaults to <FULLNAME>)
76
 
 
77
 
.. cmdoption:: -e <EMAIL>, --email <EMAIL>
78
 
 
79
 
    Email address
80
 
 
81
 
.. cmdoption:: -s <SID>, --studentid <SID>
82
 
 
83
 
    Student ID
84
 
 
85
 
.. cmdoption:: --admin
86
 
 
87
 
    Give the user global IVLE administrative privileges
88
 
 
89
 
 
90
 
ivle-buildjail
91
 
--------------
92
 
 
93
 
.. program:: ivle-buildjail
94
 
 
95
 
:program:`ivle-buildjail [OPTIONS]`
96
 
 
97
 
Creates or updates the IVLE jail template. 
98
 
 
99
 
.. cmdoption:: -r, --recreate
100
 
 
101
 
    Completely recreate the jail - don't just update its IVLE code.
102
 
 
103
 
    .. warning::
104
 
 
105
 
        This may download hundreds of megabytes from the location specified by 
106
 
        ``<MIRROR>``.
107
 
 
108
 
.. cmdoption:: -u, --upgrade
109
 
 
110
 
    Apply any package updates in the jail.
111
 
 
112
 
.. cmdoption:: -m <MIRROR>, --mirror <MIRROR>
113
 
 
114
 
    Sets the APT mirror. May also be specified in the ``jail/mirror``
115
 
    config key.
116
 
 
117
 
 
118
 
ivle-cloneworksheets
119
 
--------------------
120
 
 
121
 
.. program:: ivle-cloneworksheets
122
 
 
123
 
:program:`ivle-cloneworksheets <OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER> 
124
 
<NEWSUBJECTCODE> <NEWYEAR> <NEWSEMESTER>`
125
 
 
126
 
Populates the offering specified by ``<NEWSUBJECTCODE> <NEWYEAR> 
127
 
<NEWSEMESTER>`` with a copy of the worksheets from the offering specified by 
128
 
``<OLDSUBJECTCODE> <OLDYEAR> <OLDSEMESTER>``.
129
 
 
130
 
.. note::
131
 
    Admins may also clone worksheets from the offering administration panel
132
 
    in the web interface.
133
 
 
134
 
 
135
 
ivle-config
136
 
-----------
137
 
 
138
 
.. program:: ivle-config
139
 
 
140
 
:program:`ivle-config [ARG1] [ARG2] ...`
141
 
 
142
 
Configures IVLE with machine-specific details, most notably various paths.
143
 
Either prompts the administrator for these details or accepts them as
144
 
command line arguments.
145
 
 
146
 
Command line arguments may be any of the :ref:`configuration option 
147
 
<ref-configuration-options>` used in :file:`ivle.conf`. They are provided in 
148
 
the form of :samp:`--{section}/{subsection}/{property} {VALUE}` such as 
149
 
``--urls/root ivle.org`` or ``--media/externals/jquery 
150
 
/usr/share/javascript/jquery``.
151
 
 
152
 
Creates or updates :file:`/etc/ivle/ivle.conf` with the selected values,
153
 
and overwrites :file:`/etc/ivle/plugins.d/000default` with the latest
154
 
default plugin list.
155
 
 
156
 
 
157
 
ivle-createdatadirs
158
 
-------------------
159
 
 
160
 
.. program:: ivle-createdatadirs
161
 
 
162
 
:program:`ivle-createdatadirs`
163
 
 
164
 
Creates the IVLE data hierarchy (by default under :file:`/var/lib/ivle`) if
165
 
it does not already exist.
166
 
 
167
 
 
168
 
ivle-enrol
169
 
----------
170
 
 
171
 
.. program:: ivle-enrol
172
 
 
173
 
:program:`ivle-enrol <LOGIN> <SUBJECTCODE> <YEAR> <SEMESTER> [ROLE]`
174
 
 
175
 
Enrols a user in an offering.
176
 
 
177
 
.. note::
178
 
    Users may also be enrolled from the offering administration panel
179
 
    in the web interface.
180
 
 
181
 
.. cmdoption:: <LOGIN>
182
 
 
183
 
    Login of the user to enrol
184
 
 
185
 
.. cmdoption:: <SUBJECTCODE>
186
 
 
187
 
    Subject code
188
 
 
189
 
.. cmdoption:: <YEAR>
190
 
 
191
 
    Offering year
192
 
 
193
 
.. cmdoption:: <SEMESTER>
194
 
 
195
 
    Offering semester
196
 
 
197
 
.. cmdoption:: [ROLE]
198
 
 
199
 
    Role of the user. Should be one of 'student' (default), 'tutor' or
200
 
    'lecturer'.
201
 
 
202
 
 
203
 
ivle-enrolallusers
204
 
------------------
205
 
 
206
 
.. program:: ivle-enrolallusers
207
 
 
208
 
:program:`ivle-enrolallusers`
209
 
 
210
 
Adds enrolments for all users on the system.
211
 
Pulls from the configured :ref:`subject pulldown module 
212
 
<ref-subject-pulldown-modules>` the subjects each student
213
 
is enrolled in, and adds enrolments to the database.
214
 
Does not remove any enrolments.
215
 
 
216
 
.. note::
217
 
    Pulldown modules are consulted for each user each time they log in,
218
 
    so use of this script may not be required.
219
 
 
220
 
.. cmdoption:: -u <LOGIN>, --user <LOGIN>
221
 
 
222
 
    Just perform enrolment for user ``<LOGIN>``
223
 
 
224
 
.. cmdoption:: -v, --verbose
225
 
 
226
 
    Print out the details of each enrolment.
227
 
 
228
 
 
229
 
ivle-fetchsubmissions
230
 
---------------------
231
 
 
232
 
.. program:: ivle-fetchsubmissions
233
 
 
234
 
:program:`ivle-fetchsubmissions [OPTIONS] <SUBJECT> <PROJECT>`
235
 
 
236
 
Retrieves all submissions for a given project. Places each submission in its 
237
 
own subdirectory of the current directory. Any errors are reported to stderr
238
 
(otherwise is silent).
239
 
 
240
 
.. note::
241
 
    Since this script accesses Subversion repositories through the
242
 
    filesystem, it must be run on the master server.
243
 
 
244
 
.. cmdoption:: <SUBJECT>
245
 
 
246
 
    Subject short (URL) name
247
 
 
248
 
.. cmdoption:: <PROJECTNAME>
249
 
 
250
 
    Project short (URL) name
251
 
 
252
 
.. cmdoption:: -s <SEMESTER>, --semester <SEMESTER>
253
 
 
254
 
    Semester of the offering (eg. 2009/1). Defaults to the currently
255
 
    active semester.
256
 
 
257
 
.. cmdoption:: -d <PATH>, --dest <PATH>
258
 
 
259
 
    Destination directory (defaults to the current directory) in
260
 
    which to place submissions. Will create subdirectories in this
261
 
    directory of the form ``subject/year/semester/project``.
262
 
 
263
 
.. cmdoption:: -z, --zip
264
 
 
265
 
    Store each submission in a Zip file.
266
 
 
267
 
.. cmdoption:: -v, --verbose
268
 
 
269
 
    Print the name of each submission as it is extracted.
270
 
 
271
 
.. cmdoption:: --no-txt
272
 
 
273
 
    Disable writing a text file with metadata about each submission.
274
 
 
275
 
 
276
 
ivle-listusers
277
 
--------------
278
 
 
279
 
.. program:: ivle-listusers
280
 
 
281
 
:program:`ivle-listusers [OPTIONS]`
282
 
 
283
 
Lists all users in the IVLE database.
284
 
 
285
 
.. note::
286
 
    Users may also be listed and administered through the web interface,
287
 
    from the *Users* item in the IVLE menu.
288
 
 
289
 
.. cmdoption:: -n, --names
290
 
 
291
 
    Print only each user's login name
292
 
 
293
 
 
294
 
ivle-mountallusers
295
 
------------------
296
 
 
297
 
.. program:: ivle-mountallusers
298
 
 
299
 
:program:`ivle-mountallusers`
300
 
 
301
 
Attempts to mount the jails of all users.
302
 
 
303
 
.. note::
304
 
 
305
 
    Administrators should not need to manually run this script for regular
306
 
    operation.  IVLE will automatically mount users' jails on demand.
307
 
 
308
 
.. cmdoption:: -v, --verbose
309
 
 
310
 
    Print a message for each mount or unmount.
311
 
 
312
 
.. cmdoption:: -u, --unmount
313
 
 
314
 
    Unmount jails instead of mounting them.
315
 
 
316
 
 
317
 
ivle-refreshfilesystem
318
 
----------------------
319
 
 
320
 
.. program:: ivle-refreshfilesystem
321
 
 
322
 
:program:`ivle-refreshfilesystem`
323
 
 
324
 
Refresh parts of the filesystem to match the database.
325
 
 
326
 
In particular:
327
 
 - all jails are rebuilt
328
 
 - missing user jails are created
329
 
 - missing user and group Subversion repositories are created
330
 
 - jails for missing users are removed
331
 
 - Subversion repositories for missing users or groups are removed
332
 
 - the Subversion password file is updated
333
 
 - the Subversion authorisation files are rewritten
334
 
 
335
 
.. warning::
336
 
    Due to the full jail rebuilds, existing jail mounts may be broken
337
 
    after this script has run. To recover from this situation, use
338
 
    ``ivle-mountallusers`` to unmount all of the jails.
339
 
 
340
 
.. note::
341
 
    Jails and Subversion repositories are not entirely removed. They
342
 
    can be found in a timestamped directory alongside their parent.
343
 
 
344
 
 
345
 
ivle-remakeuser
346
 
---------------
347
 
 
348
 
.. program:: ivle-remakeuser
349
 
 
350
 
:program:`ivle-remakeuser [OPTIONS] <USER>`
351
 
 
352
 
:program:`ivle-remakeuser [OPTIONS] -a`
353
 
 
354
 
Rebuilds the jail of a single user or of all users in IVLE. This will
355
 
retain all user data, but recreate the rest of the hierarchy and
356
 
internal configuration files.
357
 
 
358
 
.. cmdoption:: <USER>
359
 
 
360
 
    Login of the user whose jail should be rebuilt
361
 
 
362
 
.. cmdoption:: -a, --all
363
 
 
364
 
    Rebuild the jail of every user
365
 
 
366
 
.. cmdoption:: -v, --verbose
367
 
 
368
 
    Print a message as each user's jail is remade
369
 
 
370
 
 
371
 
ivle-showenrolment
372
 
------------------
373
 
 
374
 
.. program:: ivle-showenrolment
375
 
 
376
 
:program:`ivle-showenrolment <USER>`
377
 
 
378
 
Shows the enrolments of a user. Prints subject code, subject name, year, 
379
 
semester and the held role for each subject in which they are enrolled.
380
 
 
381
 
.. cmdoption:: <USER>
382
 
 
383
 
    Login of the user