Vidíte historickú verziu tejto stránky. Pozrite si aktuálnu verziu.

Porovnať s aktuálnou verziou Zobraziť históriu stránky

« Predchádzajúce Verzia 2 Aktuálny »

By default, the D2000 kernel runs configured D2000 processes that run on the same computer. If the processes are running on a different computer than the D2000 kernel, it is necessary to ensure their automatic start. The d2svc script allows you to create a systemd service for such processes that will provide an automatic start.

Management of D2000 processes must be performed as user root

The script <instancedir>/bin/d2svc <command> [<appname> [<svcname>]] is used for management of independently started D2000 processes

<appname> is the name of the application, if not specified, the script will ask for the application name.

<svcname>  is the designation (unambiguous within the application) of the independently started process (typically the name of the D2000 process, e.g. "remote.kom"). If not specified, the script will ask for the application name.

<command> is one of the options:

create

creates a systemd service for independently started D2000 process.

[root@localhost bin]# ./d2svc create app1 remote.kom
Application app1 does not exist. Create remote application (Y/n)? [y] Y
Enter connection parameter to the application ('/Shostname' or '/RFgroup' or '/RDgroup'): /Ssrvmaster1
Enter D2000 process executable: kom
Enter D2000 process command line parameters: kom @app1 /Wremote
Service "remote.kom" was created, systemd unit file is "d2000-app1-remote.kom.service".

If the application is not yet based on the given computer, it will offer its creation, together with the parameters of the connection to the application server.

The script creates a systemd service with a name in the form d2000-<appname>-<svcname>.service, in this case d2000-app1-remote.kom.service.

After creating the service, the process can be started with a script ./d2proc start <appname> <proclabel>, viď nižšie.

delete

delets a systemd service for independently started D2000 process.

[root@localhost bin]# ./d2svc delete app1 remote.kom
=======================
Ready to delete D2000 service:
           Application name: app1
               Service name: remote.kom
--
        D2000 instance name: d2000
     D2000 installation dir: /opt/d2000
=======================

Really delete the service remote.kom (yes|N)? [n] yes
Service "remote.kom" was deleted.

start

starts an independently started D2000 process.

[root@localhost bin]# ./d2svc start app1 remote.kom
remote.kom started successfully.

stop

stops an independently started D2000 process.

[root@localhost bin]# ./d2svc stop app1 remote.kom
remote.kom stopped successfully.

restart

restarts  (stops and starts) an independently started D2000 process.

[root@localhost bin]# ./d2svc restart app1 remote.kom
remote.kom restarted successfully.

status

gives the information on whether the independently started D2000 process is running and whether it has auto-start set

[root@localhost bin]# ./d2svc status app1 remote.kom
remote.kom is running. Autostart is enabled.

enable-autostart

enables autostart of the independently started D2000 process

[root@localhost bin]# ./d2svc enable-autostart app1 remote.kom
Autostart of remote.kom has been enabled.

disable-autostart

disables autostart of the independently started D2000 process 

[root@localhost bin]# ./d2svc disable-autostart app1 remote.kom
Autostart of remote.kom has been disabled.
  • Žiadne štítky