284
|
1 Starting Orthanc as a GNU/Linux daemon
|
|
2 ======================================
|
|
3
|
|
4 .. contents::
|
|
5
|
0
|
6 .. highlight:: bash
|
|
7
|
284
|
8 "init" flavor
|
|
9 -------------
|
0
|
10
|
284
|
11 To install Orthanc as a GNU/Linux `init daemon
|
|
12 <https://en.wikipedia.org/wiki/Init>`__ on a Debian/Ubuntu system, you
|
|
13 can:
|
0
|
14
|
|
15 1. Download this `service script
|
262
|
16 <https://salsa.debian.org/med-team/orthanc/raw/master/debian/orthanc.init>`_
|
0
|
17 (this file is part of the `official Debian package
|
|
18 <https://tracker.debian.org/pkg/orthanc>`_ of Orthanc),
|
|
19 2. Adapt some of its variables to reflect the configuration of your
|
|
20 system,
|
|
21 3. Copy it in ``/etc/init.d`` as root (the filename cannot contain
|
|
22 dot, otherwise it is not executed), make it belong to root, and tag
|
|
23 it as executable::
|
|
24
|
|
25 $ sudo mv orthanc.init /etc/init.d/orthanc
|
|
26 $ sudo chown root:root /etc/init.d/orthanc
|
|
27 $ sudo chmod 755 /etc/init.d/orthanc
|
|
28
|
|
29 4. If you wish the daemon to be automatically launched at boot time and stopped at shutdown::
|
|
30
|
|
31 $ sudo update-rc.d orthanc defaults
|
|
32
|
|
33 5. If you wish to remove the automatic launching at boot time later on::
|
|
34
|
|
35 $ sudo update-rc.d -f orthanc remove
|
|
36
|
|
37 *Note*: You can use ``rcconf`` to easily monitor the services that are
|
|
38 run at startup::
|
|
39
|
|
40 $ sudo apt-get install rcconf
|
284
|
41
|
|
42
|
|
43 "systemd" flavor
|
|
44 ----------------
|
|
45
|
|
46 A sample `systemd daemon <https://en.wikipedia.org/wiki/Systemd>`__
|
|
47 for Orthanc can be found in the official `Fedora package
|
|
48 <https://apps.fedoraproject.org/packages/orthanc>`__:
|
|
49
|
|
50 1. Download the `systemd script
|
|
51 <https://src.fedoraproject.org/rpms/orthanc/blob/master/f/orthanc.service>`__,
|
|
52 2. Adapt some of its variables to reflect the configuration of your
|
|
53 system,
|
|
54 3. Copy it as ``/etc/systemd/system/orthanc.service``,
|
|
55 4. Start the daemon as follows::
|
|
56
|
|
57 $ sudo systemctl daemon-reload
|
|
58 $ sudo systemctl start orthanc.service
|
|
59
|
|
60 5. To make this change permanent after a reboot, you can create a
|
|
61 symbolic link as follows::
|
|
62
|
|
63 $ sudo ln -s /etc/systemd/system/orthanc.service /etc/systemd/system/default.target.wants/
|
|
64
|
|
65
|
|
66 Other GNU/Linux distributions
|
|
67 -----------------------------
|
|
68
|
|
69 The instructions above have been tested on Debian/Ubuntu/Fedora
|
|
70 systems, but should work similarly on other GNU/Linux distributions.
|