-Поиск по дневнику

Поиск сообщений в Symnok

 -Подписка по e-mail

 

 -Статистика

Статистика LiveInternet.ru: показано количество хитов и посетителей
Создан: 16.08.2023
Записей: 9
Комментариев: 0
Написано: 8





OpenVPN installer for Debian, Ubuntu, Fedora, CentOS, Arch Linux, Oracle Linux, Rocky Linux and AlmaLinux.

Четверг, 17 Августа 2023 г. 02:07 + в цитатник

Enable or Create a Service in Ubuntu 20.04 LTS

Четверг, 17 Августа 2023 г. 02:06 + в цитатник

https://linuxhandbook.com/create-systemd-services/

How to create systemd service unit in Linux

29 November 2018 by 

Although systemd has been the object of many controversies, to the point the some distributions were forked just to get rid of it (see Devuan, a fork of Debian which, by default, replaces systemd with sysvinit), in the end it has become the de-facto standard init system in the Linux world.

In this tutorial we will see how a systemd service is structured, and we will learn how to create one.

In this tutorial you will learn:

  • What is a service unit..
  • What are the sections of a service unit.
  • What are the most common options which can be used in each section.
  • What are the different types of service that can be defined.

 

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System A GNU/Linux distribution which uses systemd as init system
Software systemd
Other Root permissions are required to install and manage a service.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

The systemd init system

rpm

All the major distributions, such as Rhel, CentOS, Fedora, Ubuntu, Debian and Archlinux, adopted systemd as their init system. Systemd, actually, is more than just an init system, and that’s one of the reasons why some people are strongly against its design, which goes against the well established unix motto: “do one thing and do it well”. Where other init systems use simple shell script to manage services, systemd uses its own .service files (units with the .service suffix): in this tutorial we will see how they are structured and how to create and install one.



Anatomy of a service unit

What is a service unit? A file with the .service suffix contains information about a process which is managed by systemd. It is composed by three main sections:

  • [Unit]: this section contains information not specifically related to the type of the unit, such as the service description
  • [Service]: contains information about the specific type of the unit, a service in this case
  • [Install]: This section contains information about the installation of the unit

Let’s analyze each of them in detail.

The [Unit] section

The [Unit] section of a .service file contains the description of the unit itself, and information about its behavior and its dependencies: (to work correctly a service can depend on another one). Here we discuss some of the most relevant options which can be used in this section

The “Description” option

First of all we have the Description option. By using this option we can provide a description of the unit. The description will then appear, for example, when calling the systemctl command, which returns an overview of the status of systemd. Here it is, as an example, how the description of httpd service is defined on a Fedora system:

[Unit]
Description=The Apache HTTP Server

The “After” option

By using the After option, we can state that our unit should be started after the units we provide in the form of a space-separated list. For example, observing again the service file where the Apache web service is defined, we can see the following:

After=network.target remote-fs.target nss-lookup.target httpd-init.service

The line above instructs systemd to start the service unit httpd.service only after the networkremove-fsnss-lookup targets and the httpd-init service.

Specifying hard dependencies with “Requires”



As we briefly mentioned above, a unit (a service in our case) can depend on other units (not necessarily “service” units) to work correctly: such dependencies can be declared by using the Requires option.

If any of the units on which a service depends fails to start, the activation of the service it’s stopped: this is why those are called hard dependencies. In this line, extracted from the service file of the avahi-daemon, we can see how it is declared as dependent from the avahi-daemon.socket unit:

Requires=avahi-daemon.socket

Declaring “soft” dependencies with “Wants”

We just saw how to declare the so called “hard” dependencies for the service by using the Requires option; we can also list “soft” dependencies by using the Wants option.

What is the difference? As we said above, if any “hard” dependency fails, the service will fail itself; a failure of any “soft” dependency, however, doesn’t influence what happens to the dependent unit. In the provided example, we can see how the docker.service unit has a soft dependency on the docker-storage-setup.service one:

[Unit]
Wants=docker-storage-setup.service

The [Service] section

In the [Service] section of a service unit, we can specify things as the command to be executed when the service is started, or the type of the service itself. Let’s take a look at some of them.

Starting, stopping, and reloading a service

A service can be started, stopped, restarted or reloaded. The commands to be executed when performing each of these actions can be specified by using the related options in the [Service] section.

The command to be executed when a service starts, is declared by using the ExecStart option. The argument passed to the option can also be the path to a script. Optionally, we can declare commands to be executed before and after the service is started, by using the ExecStartPre and ExecStartPost options respectively. Here is the command used to start the NetworkManager service:



[Service]
ExecStart=/usr/sbin/NetworkManager --no-daemon

In a similar fashion, we can specify the command to be executed when a service is reloaded or stopped, by using the ExecStop and ExecReload options. Similarly to what happens with ExecStartPost, a command or multiple commands to be launched after a process is stopped, can be specified with the ExecStopPost option.

The type of the service

Systemd defines and distinguish between some different type of services depending on their expected behavior. The type of a service can be defined by using the Type option, providing one of these values:

  • simple
  • forking
  • oneshot
  • dbus
  • notify

The default type of a service, if the Type and Busname options are not defined, but a command is provided via the ExecStart option, is simple. When this type of service is set, the command declared in ExecStart is considered to be the main process/service.

The forking type works differently: the command provided with ExecStart is expected to fork and launch a child process, which will become the main process/service. The parent process it’s expected to die once the startup process is over.

The oneshot type is used as the default if the Type and ExecStart options are not defined. It works pretty much like simple: the difference is that the process is expected to finish its job before other units are launched. The unit, however, it’s still considered as “active” even after the command exits, if the RemainAfterExit option is set to “yes” (the default is “no”).

The next type of service is dbus. If this type of service is used, the daemon is expected to get a name from Dbus, as specified in the BusName option, which in this case, becomes mandatory. For the rest it works like the simple type. Consequent units, however, are launched only after the DBus name is acquired.

Another process works similarly to simple, and it is notify: the difference is that the daemon is expected to send a notification via the sd_notify function. Only once this notification is sent, consequent units are launched.

Set process timeouts

By using specific options, it’s possible to define some timeouts for the service. Let’s start with RestartSec: by using this option, we can setup the amount of time (by default in seconds) systemd should wait before restarting a service. A timespan can also be used as a value for this option, as “5min 20s”. The default is 100ms.



The TimeoutStartSec and TimeoutStopSec options can be used to specify, respectively, the timeout for a service startup and stop, in seconds. In the first case, if after the specified timeout the daemon startup process it’s not completed, it will be considered to be failed.

In the second case, if a service is to be stopped but is not terminated after the specified timeout, first a SIGTERM and then, after the same amount of time, a SIGKILL signal are sent to it. Both options accepts also a timespan as a value and can be configured at once, with a shortcut: TimeoutSec. If infinity is provided as a value, the timeouts are disabled.

Finally, we can setup the limit for the amount of time a service can run, using the RuntimeMaxSec. If a service exceeds this timeout, it’s terminated and considered as failed.

The [Install] section

In the [install] section, we can use options related to the service installation. For example, by using the Alias option, we can specify a space separated list of aliases to be used for the service when using the systemctl commands (except enable).

Similarly to what happens with the Requires and Wants options in the [Unit] section, to establish dependencies, in the [install] section, we can use RequiredBy and WantedBy. In both cases we declare a list of units which depend on the one we are configuring: with the former option they will be hard-dependent on it, with the latter they will be considered only as weak-dependent. For example:

[Install]
WantedBy=multi-user.target

With the line above we declared that the multi-user target has a soft dependency on our unit. In systemd terminology, units ending with the .target suffix, can be associated with what were called runtimes in other init systems as Sysvinit. In our case, then, the multi-user target, when reached, should include our service.

Creating and installing a service unit

There are basically two places in the filesystem where systemd service units are installed: 


Синхронизация почты, контактов и календаря с аккаунтом Майкрософта (Windows 10 Mobile):

Четверг, 17 Августа 2023 г. 02:04 + в цитатник

https://4pda.to/forum/index.php?s=&showtopic=1...;view=findpost&p=121704080

 

Для тех, у кого отвалилась синхронизация почты, контактов и календаря с аккаунтом Майкрософта (W10M):

 

Майкрософт что-то обновляет на своих серверх и на некоторых аккаунтах отвалилась синхронизация почты, контактов и календаря. Убрать и добавить аккаунт проблемы не решает.

 

Что делать:

 

Допустим, ваш Майкрософт аккаунт xxx@hotmail.com

 

1. Убираем этот аккаунт из списка аккаунтов email, но оставляем в списке Microsoft аккаунтов.

2. Добавляем его как Exchange ActiveSync account
 (Settings->Accounts->Add Account->Advanced Setup->Exchange ActiveSync)

3. В настройках контактов и календаря ставим галочки сонхронизировать контакты/календарь с Exchange ActiveSync аккаунтом xxx@hotmail.com и, соответственно, убираем эти галочки с Microsoft Account xxx@hotmail.com

 

В итоге у вас два аккаунта:

- Microsoft Account xxx@hotmail.com - используется для Microsoft Store и OneDrive

- Exchange ActiveSync аккаунт xxx@hotmail.com - используется для email, контактов и календаря

 

Нужно иметь ввиду, что в какой-то момент синхронизация по Exchange ActiveSync тоже отвалится т.к. Майкрософт обновит свои сервера на новую версию, которая несовместима со старыми клиентами. 

Это уже произошло с корпоративными серверами MS Exchange. В таком случае, надо добавить xxx@hotmail.com как IMAP/SMTP account используя application specific password (а для этого надо включить 2FA).  Контакты и календарь, естественно, перестанут синхронизироваться. 

Настройки здесь: 

https://4pda.to/forum/index.php?s=&showtopic=1...;view=findpost&p=121704262

 

Как альтернатива, можно синхронизироваться с аккаунтом Гугла (только для W10M): https://4pda.to/forum/index.php?showtopic=1031561

или использовать сервис memotoo.com (в бесплатной версии - до 500 контактов) для синхронизации с Google или CardDAV/CalDAV сервером. Этот сервис использует сознательно старую версию Exchange ActiveSync (но без поддержки email) для синхронизации со старыми телефонами. Будет работать на WP8.1, W10M (и на Symbian и Nokia S40). Почемy-то глючно работает с WP 7.x.


Номера SipBroker

Четверг, 17 Августа 2023 г. 02:01 + в цитатник

 

 http://www.sipbroker.com/sipbroker/action/pstnNumbers

As of July 1 2023

Israel
City PSTN Number Sponsor Notes
Jerusalem +972-2-5695099 DIDWW 2 concurrent calls supported
National - Cellcom +972-73-2444224 DIDWW 2 concurrent calls supported
National - Hot Telecom +972-77-5664488 DIDWW 500 concurrent calls supported
Tel Aviv +972-3-9150800 DIDWW 500 concurrent calls supported

 
U.S.A
City PSTN Number Sponsor Notes
Allentown +1-484-2233755 DIDWW 2 concurrent calls supported
Anaheim, CA +1-714-333-0397 LES.NET  
Anaheim, CA +1-714-400-0575 Callcentric  
Arlington +1-817-5246777 DIDWW 2 concurrent calls supported
Atlanta +1-678-3999699 DIDWW 2 concurrent calls supported
Atlanta, GA +1-404-478-6460 Callcentric  
Aurora +1-720-2627827 DIDWW 2 concurrent calls supported
Aurora, IL +1-630-405-0745 Callcentric  
Baltimore +1-443-5247788 DIDWW 2 concurrent calls supported
Baltimore, MD +1-443-455-0697 LES.NET  
Baltimore, MD +1-443-524-7370 Callcentric  
Birmingham +1-205-757-0797 LES.NET  
Boise +1-208-9068433 DIDWW 2 concurrent calls supported
Boise, ID +1-208-906-1197 LES.NET  
Boston +1-617-8614466 DIDWW 2 concurrent calls supported
Boston, MA +1-617-399-8298 Callcentric  
Brooklyn +1-347-6024544 DIDWW 2 concurrent calls supported
Buffalo, NY +1-716-200-1692 LES.NET  
Burbank, CA +1-818-688-2797 LES.NET  
Canoga Park +1-818-9364699 DIDWW 2 concurrent calls supported
Chicago +1-773-8191961 DIDWW 2 concurrent calls supported
Chicago, IL +1-312-205-6444 Callcentric  
Cleveland +1-216-4521466 DIDWW 2 concurrent calls supported
Colorado Springs +1-719-6457433 DIDWW 2 concurrent calls supported
Dallas +1-214-4477120 DIDWW 2 concurrent calls supported
Dallas, TX +1-214-261-9940 Callcentric  
Denver +1-303-9973255 DIDWW 2 concurrent calls supported
Denver, CO +1-303-997-1197 LES.NET  
Detroit +1-313-3555705 DIDWW 2 concurrent calls supported
Fort Lauderdale +1-954-6532113 DIDWW 2 concurrent calls supported
Fort Lauderdale, FL +1-954-607-4525 Callcentric  
Fremont-Newark, CA +1-510-248-0397 LES.NET  
Hollywood +1-954-3747555 DIDWW 2 concurrent calls supported
Houston +1-713-5548398 DIDWW 2 concurrent calls supported
Houston, TX +1-832-369-6975 Callcentric  
Indianapolis +1-317-7596488 DIDWW 2 concurrent calls supported
Jacksonville, FL +1-904-647-0897 LES.NET  
Jacksonville, FL +1-904-239-3990 Callcentric  
Jersey City +1-201-984-1823 LES.NET  
Keys, FL +1-305-890-1597 LES.NET  
Keys, FL +1-305-359-4571 Callcentric  
Las Vegas +1-702-7890530 DIDWW 2 concurrent calls supported
Las Vegas, NV +1-702-553-2797 LES.NET  
Los Angeles, CA +1-323-2077414 DIDWW 2 concurrent calls supported
Los Angeles, CA +1-323-209-2868 Routed Systems  
Los Angeles, CA +1-213-514-5397 LES.NET  
Los Angeles, CA +1-323-375-2897 LES.NET  
Los Angeles, CA +1-213-258-4475 Callcentric  
Miami +1-954-6074507 DIDWW 2 concurrent calls supported
Miami, FL +1-305-537-5650 Callcentric  
Michigan +1-616-608-0509 Timmins Technologies, LLC  
Michigan 182 Numbers Telesthetic  
Nassau, NY +1-516-717-1635 Callcentric  
New York +1-212-4611066 DIDWW 2 concurrent calls supported
New York, NY +1-646-291-2168 LES.NET  
New York, NY +1-646-810-9280 Callcentric  
Norwalk, CA +1-562-262-0897 LES.NET  
Oakland Berkley, CA +1-510-495-6397 LES.NET  
Oakland Berkley, CA +1-510-280-1620 Callcentric  
Oakland Trinidad +1-510-544-4497 LES.NET  
Ogden, UT +1-801-823-1197 LES.NET  
Orlando, FL +1-321-445-0797 LES.NET  
Orlando, FL +1-321-251-1890 Callcentric  
Palo Alto +1-650-644-1997 LES.NET  
Pasadena, CA +1-626-243-2197 LES.NET  
Philadelphia, PA +1-267-861-0797 LES.NET  
Philadelphia, PA +1-215-279-5938 Callcentric  
Phoenix, AZ +1-602-9267447 DIDWW 2 concurrent calls supported
Phoenix, AZ +1-602-427-5727 Callcentric  
Pittsburgh, PA +1-412-360-7797 LES.NET  
Portland, OR +1-503-334-0597 LES.NET  
Provo, UT +1-801-877-1197 LES.NET  
Reno, NV +1-775-562-4697 LES.NET  
Sacramento, CA +1-916-209-4599 Routed Systems  
Sacramento, CA +1-916-313-3897 LES.NET  
Sacramento, CA +1-916-307-5151 Callcentric  
Salt Lake City, UT +1-801-618-0497 LES.NET  
San Diego,CA +1-619-393-1797 LES.NET  
San Diego, CA +1-619-684-3139 Callcentric  
San Francisco +1-415-5207622 DIDWW 2 concurrent calls supported
San Francisco, CA +1-415-376-7297 LES.NET  
San Francisco, CA +1-415-594-0355 Callcentric  
San Jose, CA +1-408-538-2197 LES.NET  
San Jose, CA +1-408-625-4997 Callcentric  
San Mateo +1-650-523-6897 LES.NET  
San Rafael +1-415-223-4197 LES.NET  
Santa Barbara, CA +1-805-456-8597 LES.NET  
Santa Cruz, CA +1-831-480-3997 LES.NET  
Santa Monica, CA +1-310-862-5297 LES.NET  
Sarasota, FL +1-941-487-7697 LES.NET  
Sarasota, FL +1-941-296-7097 Callcentric  
Seattle, WA +1-206-829-6497 LES.NET  
Seattle, WA +1-360-526-0602 IPKall  
Spokane, WA +1-509-931-0297 LES.NET  
Tacoma, WA +1-253-617-4597 LES.NET  
Tallahassee, FL +1-850-254-7290 Callcentric  
Tampa, FL +1-813-200-5979 Callcentric  
Torrance, CA +1-310-294-8397 LES.NET  
Twin Cities, MN +1-612-604-4274 Callcentric  
Walnut Creek +1-925-891-8297 LES.NET  
Washington DC +1-202-8214808 DIDWW 2 concurrent calls supported
Washington DC +1-202-552-1297 LES.NET  
Washington DC +1-202-821-4740 Callcentric  
West Palm Beach, FL +1-561-909-2899 Callcentric  
Wilmington, DE +1-302-824-0697 LES.NET  
Wilmington, DE +1-302-442-7167 Callcentric

Приложение Одноклассники (версия 4.9.1) на WP8.1 и W10M поддерживает push notifications

Четверг, 17 Августа 2023 г. 01:47 + в цитатник

Приложение Одноклассники (версия 4.9.1) на WP8.1 и W10M поддерживает push notifications (т.е. получает уведомления при выключенном экране) и пересылку фото и видео файлов.


Также совместимо с TamTam Messenger (включая пересылку фото и видео файлов) и Jabber/XMPP (вложения не поддерживатся).


Установщик (для WP8.1/W10M): 



MS Store: https://apps.microsoft.com/store/detail/%D0%BE%D0%BA/9WZDNCRFJ1X9

При поиске в Магазине, выбрать "Available on Mobile", иначе можете получить пустой результат поиска.


Есть поддержка XMPP:
 
Для того, чтобы подключиться к Jabber протоколу в "Одноклассниках", нужно уточнить свой id в этой социальной сети в настройках профиля на сайте. 
 
Этот id необходимо ввести в настройках IM клиента в поле username/учетная запись, а в качестве домена/сервера указать odnoklassniki.ru. Если вместо двух раздельных полей клиент требует ввести JID в одно поле, то это - id@odnoklassniki.ru.
 
В поле "пароль" нужно ввести пароль от профиля на "Одноклассниках".
 
Иногда также требуется указать адрес сервера и порт вручную - это xmpp.odnoklassniki.ru и 5222.

логин 1234567891@odnoklassniki.ru
пароль *********
сервер/хост xmpp.odnoklassniki.ru
порт 5222

https://vk.com/topic-119963489_34120834

Jabber/XMPP access to Odnoklassniki (ok.ru)

Четверг, 17 Августа 2023 г. 01:44 + в цитатник

You can access Russian Social Network "Odnoklassniki" ("Classmates") via Jabber/XMPP for messaging 

 

You should use your ID (xxxxx in this example) found on Settings page of your account. It is numeric string (not your phone number)

 

The setup is (depending on XMPP client)

 

First option:

 

login: xxxxx@odnoklassniki.ru

password: your password

server: xmpp.odnoklassniki.ru

port: 5222

SSL: NO

TLS: NO (for old clients and systems) / YES (for new clients and systems)

 

Second option (if the first one doesn't work):

 

login: xxxxx@xmpp.odnoklassniki.ru

password: your password

server: xmpp.odnoklassniki.ru

port: 5222

SSL: NO

TLS: NO (for old clients and systems) / YES (for new clients and systems)

 

If your client does not have "Server" field, then use these settings

 

login: xxxxx@xmpp.odnoklassniki.ru

password: your password

SSL: NO

TLS: NO (for old clients and systems) / YES (for new clients and systems)

 

Please note: xmpp.odnoklassniki.ru supports connections with and without SSL or TLS.

 
 

Workaround for synchronization error of Microsoft hotmail.com/outlook.com account on W10M Lumia

Четверг, 17 Августа 2023 г. 01:42 + в цитатник

It is a known issue. For unknow reason, email, calendar and contact syncing stops working randomly.

Workaround:
 
Let's say your Microsoft account email is xxx@hotmail.com
 
Remove this account from the list of email accounts but leave it as is as Microsoft account.
 
At this point, your Microsoft account xxx@hotmail.com will be used only for MS Store and OneDrive.
 
Now second step:
 
1. Create ActiveSync account (Accounts-->Email & Apps accounts->Add an account->Advanced setup->Exchange ActiveSync) with following parameters:
 
email: xxx@hotmail.com 
User name: xxx@hotmail.com 
password: your account password 
Domain: empty or hotmail.com or outlook.com (the same as a domain part of your email)
Account name: "xxx@hotmail.com ActiveSync" (without quotes)
Server (if asked): m.hotmail.com
SSL: yes
Synchronize email, contact and calendar: YES
 
2. In calendar and contact settings enable displaying contacts and calendar from account xxx@hotmail.com ActiveSync
 
At this point you will have two xxx@hotmail.com accounts: 
- Microsoft account xxx@hotmail.com used for Store and OneDrive 
- Exchange ActiveSync account used for email, calendar and contacts 
 
This manual is applicable to all type of Microsoft accounts (hotmail.com, outlook.com, msn.com, live.com, country specific Microsoft email domains).


 
 

Test

Четверг, 17 Августа 2023 г. 01:34 + в цитатник

Test


Дневник Symnok

Среда, 16 Августа 2023 г. 16:07 + в цитатник

Symnok. Просто Symnok. Все о Symnok и ничего без Symnok.



Поиск сообщений в Symnok
Страницы: [1] Календарь