Mercurial > hg > orthanc-book
annotate Sphinx/source/faq/debian-daemon.rst @ 572:b78e8bf4d021
opensuse
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 26 Dec 2020 10:59:40 +0100 |
parents | 76db4223f495 |
children | ac493614ba2e |
rev | line source |
---|---|
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 | |
482
76db4223f495
fix link to systemd because of Fedora package being orphaned
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
284
diff
changeset
|
48 <https://src.fedoraproject.org/rpms/orthanc>`__ (now orphaned - please |
76db4223f495
fix link to systemd because of Fedora package being orphaned
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
284
diff
changeset
|
49 consider :ref:`contributing by adopting this package <contributing>`): |
284 | 50 |
51 1. Download the `systemd script | |
482
76db4223f495
fix link to systemd because of Fedora package being orphaned
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
284
diff
changeset
|
52 <https://src.fedoraproject.org/rpms/orthanc/blob/f32/f/orthanc.service>`__, |
284 | 53 2. Adapt some of its variables to reflect the configuration of your |
54 system, | |
55 3. Copy it as ``/etc/systemd/system/orthanc.service``, | |
56 4. Start the daemon as follows:: | |
57 | |
58 $ sudo systemctl daemon-reload | |
59 $ sudo systemctl start orthanc.service | |
60 | |
61 5. To make this change permanent after a reboot, you can create a | |
62 symbolic link as follows:: | |
63 | |
64 $ sudo ln -s /etc/systemd/system/orthanc.service /etc/systemd/system/default.target.wants/ | |
65 | |
66 | |
67 Other GNU/Linux distributions | |
68 ----------------------------- | |
69 | |
70 The instructions above have been tested on Debian/Ubuntu/Fedora | |
71 systems, but should work similarly on other GNU/Linux distributions. |