diff --git a/docs/user/installation_debian.md b/docs/user/installation_debian.md index 63bc8b37a46f3891c665666eb41fa8ee18a0dd6a..00e34d140a227177c190b469e56c25c2b5db8fd3 100644 --- a/docs/user/installation_debian.md +++ b/docs/user/installation_debian.md @@ -22,5 +22,5 @@ A Smith node needs to be installed. 1. Change the default configuration by modifying `/etc/duniter/env_file`. -2. Start the service: `sudo systemctl start distance-oracle.timer`. -3. Enable the service at startup: `sudo systemctl enable distance-oracle.timer`. +2. Start the service: `sudo systemctl start distance-oracle.service`. +3. Enable the service at startup: `sudo systemctl enable distance-oracle.service`. diff --git a/resources/debian/distance-oracle.service b/resources/debian/distance-oracle.service index 66fe13e536b2ee0055d081f11f196e03fb273638..8bd2fb7630677de81ca00a57f82b97ccb7e9f0dc 100644 --- a/resources/debian/distance-oracle.service +++ b/resources/debian/distance-oracle.service @@ -5,6 +5,6 @@ After=duniter-smith.service [Service] EnvironmentFile=/etc/duniter/env_file -ExecStart=/usr/bin/duniter2 distance-oracle --evaluation-result-dir ${BASE_PATH}/chains/${DUNITER_CHAIN_NAME}/distance --rpc-url ${ORACLE_RPC_URL} --log ${ORACLE_LOG_LEVEL} +ExecStart=/usr/bin/duniter2 distance-oracle --evaluation-result-dir ${BASE_PATH}/chains/${DUNITER_CHAIN_NAME}/distance --rpc-url ${ORACLE_RPC_URL} --interval ${ORACLE_INTERVAL} --log ${ORACLE_LOG_LEVEL} User=duniter Group=duniter diff --git a/resources/debian/distance-oracle.timer b/resources/debian/distance-oracle.timer deleted file mode 100644 index de70093292fb6c3c65379a854e8e180feb61e43e..0000000000000000000000000000000000000000 --- a/resources/debian/distance-oracle.timer +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Duniter distance oracle timer. - -[Timer] -EnvironmentFile=/etc/duniter/env_file -OnBootSec=1min -OnUnitActiveSec=2min - -[Install] -WantedBy=multi-user.target diff --git a/resources/debian/env_file b/resources/debian/env_file index e896759f70e3df66de01624fb8e61f9fa540504e..61ebfbd281d0a384e94ddfa8fed25507ac60654e 100644 --- a/resources/debian/env_file +++ b/resources/debian/env_file @@ -36,6 +36,11 @@ BASE_PATH=/home/duniter/.local/share/duniter # Default: ws://127.0.0.1:9944 for a local WebSocket RPC server. ORACLE_RPC_URL=ws://127.0.0.1:9944 +# Interval in seconds at which the oracle is run. +# This should not exceed the evaluation period of the blockchain. +# Default: 600 seconds +ORACLE_INTERVAL=600 + # Determines the log level for the Oracle. # Options include 'error', 'warn', 'info', 'debug', 'trace'. # 'info' is a good default that provides useful runtime information without too much detail.