Both sides previous revision Previous revision Next revision | Previous revision |
rpi_autism [2020/07/28 13:23] – [Dual Transmissions in single machine] Júne Park | rpi_autism [2023/06/09 09:48] (current) – [Specification] Júne Park |
---|
* [[:cell_epiaux|Júne's Primus ─ EPiAUX 5X]] | * [[:cell_epiaux|Júne's Primus ─ EPiAUX 5X]] |
* [[:cell_epihex|Júne's Extentus ─ EPiHEX 6]] | * [[:cell_epihex|Júne's Extentus ─ EPiHEX 6]] |
| * [[:cell_epimer|Júne's Maximus ─ EPiMER 5P]] |
* [[:cell_epinex|Júne's Secondus ─ EPiNEX 5]] | * [[:cell_epinex|Júne's Secondus ─ EPiNEX 5]] |
* [[:cell_epitab|Júne's Laminus - EPiTAB 7]] | * [[:cell_epitab|Júne's Laminus - EPiTAB 7]] |
| |
<code ini> | <code ini> |
Mounted on Type Size Used Avail Use% | Mounted on Type Size Used Avail Use% |
~/repository ext4 459G 171G 265G 40% | ~/repository ext4 459G 289G 147G 67% |
~/storage ext4 459G 195G 241G 45% | ~/storage ext4 459G 179G 257G 42% |
</code> | </code> |
| |
==== +Work logs ==== | ==== +Work logs ==== |
| |
| * Fixed ''conveyance daemon'' due to wrong lib sharing <sub> --- Updated on //2023/05/06 21:11// </sub> |
* Disable ''transmission web'' port, ''9090'' & ''9091'' and build ''proxy_pass'' pages <sub> --- Updated on //2020/07/11 03:22// </sub> | * Disable ''transmission web'' port, ''9090'' & ''9091'' and build ''proxy_pass'' pages <sub> --- Updated on //2020/07/11 03:22// </sub> |
* Plugin Wired Giga LAN {{fa>usb}} <sub> --- Updated on //2020/02/22 03:34// </sub> | * Plugin Wired Giga LAN {{fa>usb}} <sub> --- Updated on //2020/02/22 03:34// </sub> |
| |
Edit Samba configuration file --- ''/etc/samba/smb.conf'' | Edit Samba configuration file --- ''/etc/samba/smb.conf'' |
| |
| <button type="danger" size="sm" icon="mdi mdi-settings-box">[[https://wiki.meson.one/doku.php?id=secured:server_config#machine_specific|Live Configuration]]</button> |
| |
<code ini> | <code ini> |
Edit ''/etc/transmission-daemon/settings.json'' | Edit ''/etc/transmission-daemon/settings.json'' |
| |
<button type="danger" size="sm" icon="mdi mdi-settings-box">[[https://wiki.meson.one/doku.php?id=secured:server_config#machine_specific|Live Configuration]]</button> | <button type="danger" size="sm" icon="mdi mdi-settings-box">[[https://wiki.meson.one/doku.php?id=secured:server_config|Live Configuration]]</button> |
| |
<code yaml> | <code yaml> |
Edit ''/etc/conveyance-daemon/settings.json''. Compare and check settings with default values. | Edit ''/etc/conveyance-daemon/settings.json''. Compare and check settings with default values. |
| |
<button type="danger" size="sm" icon="mdi mdi-settings-box">[[https://wiki.meson.one/doku.php?id=secured:server_config#machine_specific|Live Configuration]]</button> | <button type="danger" size="sm" icon="mdi mdi-settings-box">[[https://wiki.meson.one/doku.php?id=secured:server_config|Live Configuration]]</button> |
| |
| |
</code> | </code> |
| |
=== Resat services === | === Restart services === |
| |
Start the original and the duplicated daemon to check any errors or conflicts | Start the original and the duplicated daemon to check any errors or conflicts |
==== Notify completion of downloading ==== | ==== Notify completion of downloading ==== |
| |
When downloading in Transmission is finished, send simple ''notification'' via ''**PushBullet**'' or ''**Telegram**''. | When downloading finishes in Transmission, get **notification** via message services. |
| |
Option A. via ''**PushBullet**'' | === Getting API from PushBullet === |
| |
''get'' API key from PushBullet --- [[https://www.pushbullet.com/#settings|Create Access Token]] | Get API key from PushBullet service --- [[https://www.pushbullet.com/#settings/account|Create Access Token]] |
| |
* API key is like ''o.8jh96v9p49vW73X3U4HByxo87MLVw4kM'' | * API key is like ''o.8jh96v9p49vW73X3U4HByxo87MLVw4kM'' |
| |
{{fa>telegram?color=#0088cc}} Option B. via ''**Telegram**'' | === Getting API from Telegram === |
| |
''get'' API key & chat_id --- [[https://telegram.me/botfather|Create your own Bot]] with ''/newbot'' command. | To get API from {{mdi>telegram?color=#0088cc}} **Telegram**, need to create Telegram Bot by which notification is sending. |
| |
''Create'' Bot and finish ''settings'' such as Bot Name, Description, Profile image and so on. | Create Telegram Bot --- [[https://telegram.me/botfather|Create your own Bot]] with ''/newbot'' command. |
| |
''Find'' **''API key''** from BotFather. | Finish with specific information in ''settings'' such as **Bot Name**, **Description**, **Profile image** and so on. |
| |
| After finishing Bot, find the API key from **BotFather**. |
| |
* API key is like ''977114901:279gLSo-d7XZokF4QqM69ZfF3xBKtnYQqMk'' | * API key is like ''977114901:279gLSo-d7XZokF4QqM69ZfF3xBKtnYQqMk'' |
| |
''Find'' **''chat_id''** from API key | To create script, it requires **''chat_id''** from API key. To figure out ''chat_id'', |
| |
To figure out ''chat_id'', | Goto ''https://api.telegram.org/bot**977114901:279gLSo-d7XZokF4QqM69ZfF3xBKtnYQqMk**/getUpdates'' |
| |
''https://api.telegram.org/bot**977114901:279gLSo-d7XZokF4QqM69ZfF3xBKtnYQqMk**/getUpdates'' | If result returns nothing like ''chat_id'', go to Telegram and **give some chats with your Bot**. Of course, your Bot never answers you. |
| |
If this URL returns no ''chat_id'', go to Telegram and **give some chats with your Bot**. Of course, your Bot never answers you. | Then visit again and it shows something like ''{"id":**29329664**,"first_name": ....},'' and ''**id**'' is your ''chat_id'' is ''29329664'' |
| |
After sending some chats, go URL again. It shows something like ''{"id":**29329664**,"first_name": ....},'' and ''**id**'' is your ''chat_id'' is ''29329664'' | === Modify Transmission service === |
| |
Stop daemon: ''sudo systemctl stop transmission-daemon.service'' | Stop Transmission |
| |
| <code bash> |
| sudo systemctl stop transmission-daemon.service |
| </code> |
| |
Edit ''sudo vi /etc/transmission-daemon/settings.json'' | Append the following lines in ''/etc/transmission-daemon/settings.json'' |
| |
<code json> | <code ini> |
"script-torrent-done-enabled": true, | "script-torrent-done-enabled": true, |
"script-torrent-done-filename": "/opt/script/download-done.sh", | "script-torrent-done-filename": "/opt/script/download-done.sh", |
</code> | </code> |
| |
Make execute file. | === Make executive script === |
| |
<code bash> | <code bash> |
sudo mkdir /opt/script | sudo mkdir /opt/script |
sudo touch /opt/script/download-done.sh | sudo touch /opt/script/download-done.sh |
sudo chown debian-transmission:debian-transmission /opt/script/download-done.sh | sudo chown debian-transmission:debian-transmission /opt/script/download-done.sh |
sudo chmod +x /opt/script/download-done.sh | sudo chmod +x /opt/script/download-done.sh |
sudo vi /opt/script/download-done.sh | sudo vi /opt/script/download-done.sh |
</code> | </code> |
| |
=== Script for Pushbullet (Option A) === | Put script with the following option: |
| |
| <button type="danger" size="sm" icon="mdi mdi-script-text-outline">[[https://wiki.meson.one/doku.php?id=secured:server_script|Live Scripts]]</button> |
| |
| |
| == Script for Pushbullet == |
<code bash> | <code bash> |
#!/bin/bash | #!/bin/bash |
</code> | </code> |
| |
=== Script for Telegram (Option B) === | == Script for Telegram == |
<code bash> | <code bash> |
#!/bin/bash | #!/bin/bash |
</code> | </code> |
| |
=== Script for Slack using WebHooks (Option C) === | == Script with Webhook == |
| |
| Webhook is HTTP push API for general purpose. Message services such as Slack {{mdi>slack?color=#e9a820}} provide |
<code bash> | <code bash> |
#!/bin/bash | #!/bin/bash |
WebHook address and setup instruction is guided by Slack (tm). | WebHook address and setup instruction is guided by Slack (tm). |
| |
| === Restart Transmission === |
| |
Restart daemon ''sudo systemctl start transmission-daemon.service'' | <code bash> |
| sudo systemctl start transmission-daemon.service |
| </code> |
| |
---- | ---- |