[{"data":1,"prerenderedAt":593},["ShallowReactive",2],{"$f1ghgjfvx6d15a":3,"site-header-current-blog":8,"$f1qug6ihjz8zl9":287,"$f1jzgs7nkl4xjj":351,"$f34jcw1dd34gbz":519,"$f138vnu5igqcdd":583},{"categories":4,"tags":40,"photoTags":212,"galleries":267,"blogCount":285,"photoCount":286},[5,12,19,26,33],{"id":6,"date_created":7,"date_updated":8,"name":9,"slug":10,"description":8,"count":11},"fd7f2650-a0c3-408f-b64b-99c9ab711fb4","2023-01-05T12:42:21.951Z",null,"Personal","personal",8,{"id":13,"date_created":14,"date_updated":8,"name":15,"slug":16,"description":17,"count":18},"605b0764-a744-46a9-80cc-3dc842a2673c","2022-12-13T03:15:59.051Z","Photoblog","photoblog","Photos that comes with some text",32,{"id":20,"date_created":21,"date_updated":8,"name":22,"slug":23,"description":24,"count":25},"f4051760-3a84-4f09-8f90-b69e058c7eac","2022-12-04T06:16:07.265Z","Site Updates","site-updates","Updates to this site",16,{"id":27,"date_created":28,"date_updated":8,"name":29,"slug":30,"description":31,"count":32},"ba512728-c428-4baf-904a-fb7d9ff3c66f","2022-12-28T09:51:14.448Z","Tech","tech","Everything related to Technology",13,{"id":34,"date_created":35,"date_updated":8,"name":36,"slug":37,"description":38,"count":39},"7abfd063-63b7-4839-ad4c-e6cf64b09b74","2022-12-04T06:26:54.327Z","Tutorials","tutorials","Tutorials for the layman if possible",6,[41,47,52,58,63,68,73,78,83,88,95,101,106,111,116,122,127,132,138,143,148,153,158,164,169,174,179,184,190,195,201,207],{"id":42,"date_created":43,"date_updated":8,"name":44,"slug":45,"count":46},"27d2bd05-8aa8-4c00-b71b-ff4b48edf0ee","2023-01-01T01:28:23.292Z","Automator","automator",1,{"id":48,"date_created":49,"date_updated":8,"name":50,"slug":51,"count":32},"26a218f4-2859-468d-8858-571b1ce6945d","2022-12-26T10:36:21.592Z","Camera","camera",{"id":53,"date_created":54,"date_updated":8,"name":55,"slug":56,"count":57},"df41c449-de77-47cc-aed9-0b6765913805","2023-01-26T02:49:51.302Z","Directus","directus",2,{"id":59,"date_created":60,"date_updated":8,"name":61,"slug":62,"count":57},"d9befa5d-8620-42d8-9498-e0a1952328fe","2022-12-04T12:51:47.682Z","Discourse","discourse",{"id":64,"date_created":65,"date_updated":8,"name":66,"slug":67,"count":57},"b94953f9-47f3-43b8-8b5b-8e14b5990af6","2023-01-02T01:36:20.072Z","Docker","docker",{"id":69,"date_created":70,"date_updated":8,"name":71,"slug":72,"count":46},"065f2799-b1a3-49f4-9a3a-ea76a039d5d8","2023-01-01T01:28:23.281Z","HandBrake","handbrake",{"id":74,"date_created":75,"date_updated":8,"name":76,"slug":77,"count":46},"aa5c8763-8c3d-4b74-b807-128f59f62f1b","2023-12-27T12:25:58.488Z","Hokkaido 北海道","hokkaido",{"id":79,"date_created":80,"date_updated":8,"name":81,"slug":82,"count":57},"e9aae08f-8e7b-4553-a67e-f8f3748265db","2022-12-04T12:34:29.050Z","Hypervisor","hypervisor",{"id":84,"date_created":85,"date_updated":8,"name":86,"slug":87,"count":46},"5678a065-2072-45d7-a1fb-9a15b89177be","2022-12-04T12:22:10.750Z","Intel NUC","intel-nuc",{"id":89,"date_created":90,"date_updated":91,"name":92,"slug":93,"count":94},"5ed5825b-7cbc-426b-b089-122de4ef844a","2022-12-13T03:19:50.045Z","2024-01-13T06:38:19.040Z","Japan 日本","japan",12,{"id":96,"date_created":97,"date_updated":8,"name":98,"slug":99,"count":100},"a0cf1895-89fe-48df-a683-0d356803391e","2022-12-26T04:56:55.058Z","Kyoto 京都","kyoto",3,{"id":102,"date_created":103,"date_updated":8,"name":104,"slug":105,"count":57},"82e1e735-dabe-4f22-af68-5701c5c4c3be","2023-01-08T04:46:56.425Z","LibreNMS","librenms",{"id":107,"date_created":108,"date_updated":8,"name":109,"slug":110,"count":100},"8d525d35-7cde-44d7-a739-813353946dc5","2023-01-08T04:18:32.660Z","Linux","linux",{"id":112,"date_created":113,"date_updated":8,"name":114,"slug":115,"count":46},"d25a206d-eb7b-433e-aec7-37f848ef0626","2023-01-01T01:28:23.304Z","macOS","macos",{"id":117,"date_created":118,"date_updated":8,"name":119,"slug":120,"count":121},"6d4984da-be50-4ead-a218-232d736cd0ae","2022-12-26T09:26:39.677Z","Malaysia","malaysia",4,{"id":123,"date_created":124,"date_updated":8,"name":125,"slug":126,"count":121},"88b1e7ac-cb91-46c5-928f-81b845534491","2022-12-26T09:35:09.322Z","Musicians","musicians",{"id":128,"date_created":129,"date_updated":8,"name":130,"slug":131,"count":100},"a455a675-574d-4e36-b4da-60d1dbd0f583","2023-01-26T02:49:51.292Z","Nuxt","nuxt",{"id":133,"date_created":134,"date_updated":8,"name":135,"slug":136,"count":137},"8642a081-b2df-44d3-b993-5918807babb9","2022-12-26T04:55:36.796Z","Osaka 大阪","osaka",5,{"id":139,"date_created":140,"date_updated":8,"name":141,"slug":142,"count":100},"6d3326dd-0069-4706-a839-013e03a7ba98","2022-12-31T04:44:28.192Z","pfSense","pfsense",{"id":144,"date_created":145,"date_updated":8,"name":146,"slug":147,"count":137},"a8a08b5b-d4c7-46d1-a1f4-a65edc33306e","2026-06-15T12:41:42.094Z","Photowalk","photowalk",{"id":149,"date_created":150,"date_updated":8,"name":151,"slug":152,"count":57},"f9e059a9-e501-454e-b29b-59fc1685cae2","2022-12-04T12:34:29.034Z","Plex","plex",{"id":154,"date_created":155,"date_updated":8,"name":156,"slug":157,"count":137},"cad7eef9-d788-4a7d-936e-6b5f34bdea51","2022-12-26T09:51:04.913Z","Portraits","portraits",{"id":159,"date_created":160,"date_updated":8,"name":161,"slug":162,"count":163},"2e1c3093-e56c-4a43-b5d4-0d411e58f217","2022-12-26T04:55:10.592Z","Singapore","singapore",7,{"id":165,"date_created":166,"date_updated":8,"name":167,"slug":168,"count":137},"0be17ed4-d412-40dc-92e2-a66a866601a8","2023-01-26T02:50:40.038Z","Street","street",{"id":170,"date_created":171,"date_updated":8,"name":172,"slug":173,"count":100},"d98a25aa-d5ef-4a76-b39e-c4bed915c70f","2022-12-04T12:48:55.367Z","Synology","synology",{"id":175,"date_created":176,"date_updated":8,"name":177,"slug":178,"count":46},"b087565a-f507-49c9-ba9c-410d678997c6","2022-12-26T09:15:54.449Z","Taiwan 台灣","taiwan",{"id":180,"date_created":181,"date_updated":8,"name":182,"slug":183,"count":46},"0efba885-1a84-4cfa-b5c4-4ae60009c9c5","2022-12-26T09:28:44.045Z","Tokyo 東京","tokyo",{"id":185,"date_created":186,"date_updated":8,"name":187,"slug":188,"count":189},"1879f268-b3c6-4d0b-9a24-f0ebcf2fa788","2022-12-26T10:06:05.302Z","Travel","travel",10,{"id":191,"date_created":192,"date_updated":8,"name":193,"slug":194,"count":46},"242faa31-6304-408b-a362-4b7d18fddf0a","2023-01-08T03:36:20.359Z","Ubiquiti UBNT","ubiquiti-ubnt",{"id":196,"date_created":197,"date_updated":198,"name":199,"slug":200,"count":46},"2310a0b9-025f-46b1-9ffe-68285d65fa7e","2023-01-05T23:44:29.279Z","2024-01-13T06:38:07.253Z","Wakayama 和歌山","wakayama",{"id":202,"date_created":203,"date_updated":204,"name":205,"slug":206,"count":137},"488f691b-c00b-4353-ae5a-8cce47c622bf","2022-12-04T12:49:23.697Z","2023-01-08T04:49:59.382Z","WordPress","wordpress",{"id":208,"date_created":209,"date_updated":8,"name":210,"slug":211,"count":57},"754f6d8f-0930-4360-aeca-ec09c9b56802","2022-12-04T12:11:52.745Z","XCP-ng","xcp-ng",[213,218,219,220,225,230,232,234,235,237,242,244,246,247,248,253,254,259,260,262],{"id":214,"date_created":215,"date_updated":8,"name":216,"slug":217,"count":46},"58f09f20-704e-4311-a702-c5514909de55","2025-01-10T09:17:47.104Z","Bangkok","bangkok",{"id":48,"date_created":49,"date_updated":8,"name":50,"slug":51,"count":46},{"id":74,"date_created":75,"date_updated":8,"name":76,"slug":77,"count":57},{"id":221,"date_created":222,"date_updated":8,"name":223,"slug":224,"count":46},"4b245bca-7c9f-4c89-9529-7e9f00826660","2022-12-26T10:19:20.528Z","Hong Kong","hong-kong",{"id":226,"date_created":227,"date_updated":8,"name":228,"slug":229,"count":39},"df67b403-8477-46be-a143-f91ff975b854","2022-12-26T10:06:05.312Z","Iceland","iceland",{"id":89,"date_created":90,"date_updated":91,"name":92,"slug":93,"count":231},35,{"id":96,"date_created":97,"date_updated":8,"name":98,"slug":99,"count":233},9,{"id":117,"date_created":118,"date_updated":8,"name":119,"slug":120,"count":137},{"id":123,"date_created":124,"date_updated":8,"name":125,"slug":126,"count":236},11,{"id":238,"date_created":239,"date_updated":8,"name":240,"slug":241,"count":25},"54ba4419-6d63-4151-a1be-9042a9434ef9","2022-12-26T10:06:50.266Z","Nature","nature",{"id":133,"date_created":134,"date_updated":8,"name":135,"slug":136,"count":243},14,{"id":154,"date_created":155,"date_updated":8,"name":156,"slug":157,"count":245},15,{"id":159,"date_created":160,"date_updated":8,"name":161,"slug":162,"count":100},{"id":165,"date_created":166,"date_updated":8,"name":167,"slug":168,"count":189},{"id":249,"date_created":250,"date_updated":8,"name":251,"slug":252,"count":121},"a2f83ff0-e58b-4d27-99eb-879be03b8993","2022-12-27T05:40:14.128Z","Studio","studio",{"id":175,"date_created":176,"date_updated":8,"name":177,"slug":178,"count":233},{"id":255,"date_created":256,"date_updated":8,"name":257,"slug":258,"count":46},"6057ecc5-3ae9-4f18-8cce-ce36a87cb4b8","2025-01-10T09:14:31.171Z","Thailand","thailand",{"id":180,"date_created":181,"date_updated":8,"name":182,"slug":183,"count":57},{"id":185,"date_created":186,"date_updated":8,"name":187,"slug":188,"count":261},31,{"id":263,"date_created":264,"date_updated":8,"name":265,"slug":266,"count":57},"0917e8d0-dc96-46e7-8371-81b7479f238e","2022-12-26T09:26:39.689Z","Underwater Diving","underwater-diving",[268,277],{"id":269,"status":270,"date_created":271,"date_updated":272,"name":273,"description":274,"slug":275,"count":276},"b42cd153-b489-47ff-aee9-5e4b2d20d020","published","2022-10-02T03:19:52.789Z","2022-12-26T04:54:12.878Z","Black and White","Black and White Photos","black-and-white",20,{"id":278,"status":270,"date_created":279,"date_updated":280,"name":281,"description":282,"slug":283,"count":284},"64cbc225-cfeb-4b00-a902-b1cf9559f081","2022-10-01T08:53:38.310Z","2025-01-11T23:37:01.134Z","Color","カラー","color",44,59,64,{"categories":288,"tags":294,"photoTags":327,"galleries":348,"blogCount":285,"photoCount":286},[289,290,291,292,293],{"id":6,"date_created":7,"date_updated":8,"name":9,"slug":10,"description":8,"count":11},{"id":13,"date_created":14,"date_updated":8,"name":15,"slug":16,"description":17,"count":18},{"id":20,"date_created":21,"date_updated":8,"name":22,"slug":23,"description":24,"count":25},{"id":27,"date_created":28,"date_updated":8,"name":29,"slug":30,"description":31,"count":32},{"id":34,"date_created":35,"date_updated":8,"name":36,"slug":37,"description":38,"count":39},[295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326],{"id":42,"date_created":43,"date_updated":8,"name":44,"slug":45,"count":46},{"id":48,"date_created":49,"date_updated":8,"name":50,"slug":51,"count":32},{"id":53,"date_created":54,"date_updated":8,"name":55,"slug":56,"count":57},{"id":59,"date_created":60,"date_updated":8,"name":61,"slug":62,"count":57},{"id":64,"date_created":65,"date_updated":8,"name":66,"slug":67,"count":57},{"id":69,"date_created":70,"date_updated":8,"name":71,"slug":72,"count":46},{"id":74,"date_created":75,"date_updated":8,"name":76,"slug":77,"count":46},{"id":79,"date_created":80,"date_updated":8,"name":81,"slug":82,"count":57},{"id":84,"date_created":85,"date_updated":8,"name":86,"slug":87,"count":46},{"id":89,"date_created":90,"date_updated":91,"name":92,"slug":93,"count":94},{"id":96,"date_created":97,"date_updated":8,"name":98,"slug":99,"count":100},{"id":102,"date_created":103,"date_updated":8,"name":104,"slug":105,"count":57},{"id":107,"date_created":108,"date_updated":8,"name":109,"slug":110,"count":100},{"id":112,"date_created":113,"date_updated":8,"name":114,"slug":115,"count":46},{"id":117,"date_created":118,"date_updated":8,"name":119,"slug":120,"count":121},{"id":123,"date_created":124,"date_updated":8,"name":125,"slug":126,"count":121},{"id":128,"date_created":129,"date_updated":8,"name":130,"slug":131,"count":100},{"id":133,"date_created":134,"date_updated":8,"name":135,"slug":136,"count":137},{"id":139,"date_created":140,"date_updated":8,"name":141,"slug":142,"count":100},{"id":144,"date_created":145,"date_updated":8,"name":146,"slug":147,"count":137},{"id":149,"date_created":150,"date_updated":8,"name":151,"slug":152,"count":57},{"id":154,"date_created":155,"date_updated":8,"name":156,"slug":157,"count":137},{"id":159,"date_created":160,"date_updated":8,"name":161,"slug":162,"count":163},{"id":165,"date_created":166,"date_updated":8,"name":167,"slug":168,"count":137},{"id":170,"date_created":171,"date_updated":8,"name":172,"slug":173,"count":100},{"id":175,"date_created":176,"date_updated":8,"name":177,"slug":178,"count":46},{"id":180,"date_created":181,"date_updated":8,"name":182,"slug":183,"count":46},{"id":185,"date_created":186,"date_updated":8,"name":187,"slug":188,"count":189},{"id":191,"date_created":192,"date_updated":8,"name":193,"slug":194,"count":46},{"id":196,"date_created":197,"date_updated":198,"name":199,"slug":200,"count":46},{"id":202,"date_created":203,"date_updated":204,"name":205,"slug":206,"count":137},{"id":208,"date_created":209,"date_updated":8,"name":210,"slug":211,"count":57},[328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347],{"id":214,"date_created":215,"date_updated":8,"name":216,"slug":217,"count":46},{"id":48,"date_created":49,"date_updated":8,"name":50,"slug":51,"count":46},{"id":74,"date_created":75,"date_updated":8,"name":76,"slug":77,"count":57},{"id":221,"date_created":222,"date_updated":8,"name":223,"slug":224,"count":46},{"id":226,"date_created":227,"date_updated":8,"name":228,"slug":229,"count":39},{"id":89,"date_created":90,"date_updated":91,"name":92,"slug":93,"count":231},{"id":96,"date_created":97,"date_updated":8,"name":98,"slug":99,"count":233},{"id":117,"date_created":118,"date_updated":8,"name":119,"slug":120,"count":137},{"id":123,"date_created":124,"date_updated":8,"name":125,"slug":126,"count":236},{"id":238,"date_created":239,"date_updated":8,"name":240,"slug":241,"count":25},{"id":133,"date_created":134,"date_updated":8,"name":135,"slug":136,"count":243},{"id":154,"date_created":155,"date_updated":8,"name":156,"slug":157,"count":245},{"id":159,"date_created":160,"date_updated":8,"name":161,"slug":162,"count":100},{"id":165,"date_created":166,"date_updated":8,"name":167,"slug":168,"count":189},{"id":249,"date_created":250,"date_updated":8,"name":251,"slug":252,"count":121},{"id":175,"date_created":176,"date_updated":8,"name":177,"slug":178,"count":233},{"id":255,"date_created":256,"date_updated":8,"name":257,"slug":258,"count":46},{"id":180,"date_created":181,"date_updated":8,"name":182,"slug":183,"count":57},{"id":185,"date_created":186,"date_updated":8,"name":187,"slug":188,"count":261},{"id":263,"date_created":264,"date_updated":8,"name":265,"slug":266,"count":57},[349,350],{"id":269,"status":270,"date_created":271,"date_updated":272,"name":273,"description":274,"slug":275,"count":276},{"id":278,"status":270,"date_created":279,"date_updated":280,"name":281,"description":282,"slug":283,"count":284},{"blog":352,"post":409,"toc":413,"currentPage":46,"previousPage":8,"nextPage":8,"previousBlog":425,"nextBlog":473},{"id":353,"status":270,"title":354,"slug":355,"excerpt":356,"coverImage":357,"categories":358,"tags":359,"relatedPhotos":360,"discourseTopicId":361,"discourseEnabled":362,"dateCreated":363,"dateUpdated":364,"cover":365,"posts":405},"62181505-24c8-4b9e-bb2b-af8e19def6bb","Sending Linux Variables to Discord Webhook from Linux Bash Shell Script","sending-linux-variables-to-discord-webhook-from-linux-bash-shell-script","Linux bash script to send variables to Discord webhook","989bc363-279b-4548-a792-595829acb324",[30,37],[110],[],"18",false,"2018-08-25T16:00:00.000Z","2023-01-08T04:24:56.659Z",{"id":357,"storage":366,"filename_disk":367,"filename_download":368,"title":369,"type":370,"folder":8,"uploaded_by":371,"created_on":372,"modified_by":8,"modified_on":373,"charset":8,"filesize":374,"width":375,"height":376,"duration":8,"embed":8,"description":8,"location":8,"tags":8,"metadata":377,"focal_point_x":8,"focal_point_y":8,"tus_id":8,"tus_data":8,"uploaded_on":372,"imageSet":378},"local","989bc363-279b-4548-a792-595829acb324.png","discord-notify.png","Discord Notify","image\u002Fpng","c906bb9b-a3d0-47cb-bdd4-0af60ef3ba12","2023-01-08T04:23:01.336Z","2023-01-08T04:23:01.458Z","191952",2728,1608,{},{"sourceFingerprint":379,"transformVersion":100,"seoSlug":355,"hash":380,"original":381,"variants":383},"989bc363-279b-4548-a792-595829acb324:2023-01-08T04:23:01.458Z:191952:989bc363-279b-4548-a792-595829acb324.png","c96d3f8af06635bc",{"key":382,"width":375,"height":376,"contentType":370},"assets\u002F989bc363-279b-4548-a792-595829acb324\u002Fc96d3f8af06635bc\u002Foriginal.png",[384,389,393,397,401],{"key":385,"width":386,"height":387,"contentType":388},"assets\u002F989bc363-279b-4548-a792-595829acb324\u002Fc96d3f8af06635bc\u002Fsending-linux-variables-to-discord-webhook-from-linux-bash-shell-script-320-862c0a855aac.webp",320,189,"image\u002Fwebp",{"key":390,"width":391,"height":392,"contentType":388},"assets\u002F989bc363-279b-4548-a792-595829acb324\u002Fc96d3f8af06635bc\u002Fsending-linux-variables-to-discord-webhook-from-linux-bash-shell-script-640-8e7b24563321.webp",640,377,{"key":394,"width":395,"height":396,"contentType":388},"assets\u002F989bc363-279b-4548-a792-595829acb324\u002Fc96d3f8af06635bc\u002Fsending-linux-variables-to-discord-webhook-from-linux-bash-shell-script-960-78188c09a516.webp",960,566,{"key":398,"width":399,"height":400,"contentType":388},"assets\u002F989bc363-279b-4548-a792-595829acb324\u002Fc96d3f8af06635bc\u002Fsending-linux-variables-to-discord-webhook-from-linux-bash-shell-script-1440-7c22373aeaf6.webp",1440,849,{"key":402,"width":403,"height":404,"contentType":388},"assets\u002F989bc363-279b-4548-a792-595829acb324\u002Fc96d3f8af06635bc\u002Fsending-linux-variables-to-discord-webhook-from-linux-bash-shell-script-2048-13ce2a95515b.webp",2048,1207,[406],{"id":407,"number":46,"subtitle":8,"path":408},"d9650ead-6b87-4fc9-b6b7-b0333d8dea16","content\u002Fposts\u002Fsending-linux-variables-to-discord-webhook-from-linux-bash-shell-script\u002F01.md",{"metadata":410,"markdown":412},{"id":407,"status":270,"blog":355,"postNumber":46,"subtitle":8,"coverImage":8,"dateCreated":363,"dateUpdated":411},"2025-08-31T00:52:12.941Z","Discord provides an API where you can send messages\u002Fnotifications via their [webhook using curl](https:\u002F\u002Fbirdie0.github.io\u002Fdiscord-webhooks-guide\u002Ftools\u002Fcurl.html). Which is all very helpful, except the code provided on their website only allows plain text, you can't pass $variables onto it\n\nHaving started playing with Linux Bash scripts, it may seem natural or easy to the Linux veterans, definitely not for me\n\nSo after some research over at StackOverflow and self-test. Here is the code that will work when $variables are passed to it\n\n## Minor Update - 2020-04-22\n\nThanks and credits to skye#5254 for commenting in my Discord server that it's better to use the \"$@\" to catch all variables including whitespaces\n\nLatest Updated (better) script:\n```bash\n#!\u002Fbin\u002Fbash\nmessage=\"$@\"\n## format to parse to curl\n## echo Sending message: $message\nmsg_content=\\\"$message\\\"\n\n## discord webhook\nurl='https:\u002F\u002Freplace-your-full-discord-webhoook-url-here'\ncurl -H \"Content-Type: application\u002Fjson\" -X POST -d \"{\\\"content\\\": $msg_content}\" $url\n```\n\n[What's the difference between $@ and $*](https:\u002F\u002Funix.stackexchange.com\u002Fquestions\u002F129072\u002Fwhats-the-difference-between-and)\n\nPrevious version:\n```\nmessage=\"$1\"\n```\n## More on the code\u002Fscript\n\nThe main aim is to output the curl command as follows:\n```bash\ncurl -H \"Content-Type: application\u002Fjson\" -X POST -d \"{\"content\": \"Your messages here\"}\" $url\n```\nWrapped the messages with double quotes (escaped) to the $message variable, which is handled by $msg_content\n\nOriginal code on Discord - note the single quotes ' ' wrapping of the JSON content\n```\n-d '{\"username\": \"test\", \"content\": \"hello\"}' $url\n```\nAlso changed the ' ' to double quotes \" \" , so that Linux can return the data in $msg_content\n\n## How to use\n\nAssuming you already know the basics of basics in Linux bash scripting, you will need to save that code above in a \".sh\" file. Eg: discord-notify.sh\n\nAnyhow, for users of all experience ranging from complete beginners to somewhat experienced Linux users\n\nHere are the complete steps:\n\n1) SSH\u002FLogin\u002FOpen your Linux Terminal\n2) We will save the discord-notify.sh onto your user $HOME folder\n    ```bash\n    cd $HOME\n    nano discord-notify.sh\n    ```\n3) Paste in the code above, modify and paste your `Discord Webhook URL` for $url variable\n4) Save the file by pressing Ctrl+X, answer the questions when asked\n5) Make discord-notify.sh executable\n    ```bash\n    chmod +x discord-notify.sh\n    ```\n6) Prepare a variable for testing\n    ```bash\n    testdate=\"Text with whitespace and variable $(date +%T)\"\n    ```\n7) Test send a notification to your Discord Server\u002FChannel\n    ```bash\n    .\u002Fdiscord-notify.sh \"$testdate\"\n    ```\n\u003Cv-site-info-text level=\"warn\">Make sure you have the double quotes around your variable that you wish to send\u003C\u002Fv-site-info-text>\n\nAnd that's it.\n\n![Discord webhook with variables](https:\u002F\u002Fapi.jasonloong.com\u002Fassets\u002F989bc363-279b-4548-a792-595829acb324)\n\n_Note if you don't double quote your $testdate variable, only \"Text\" get's sent as shown on_ screenshot _above_\n\nI'll leave it to you on how you want to modify the code above to become a function to use in your scripts, or just call the `discord-notify.sh` script from another script\n\nExample:\n```bash\n#!\u002Fbin\u002Fbash\n## This is \"changetheworld-super-script.sh\" Your almighty script\n# Make a call to the discord-notify.sh script located in $HOME\n$HOME\u002Fdiscord-notify.sh \"$heal_the_world\"\n```\nAs there is no one \"correct\" way to program\u002Fscript, appreciate it if you could share your version of code that worked for you, or share something even better!",{"title":414,"searchDepth":57,"depth":57,"links":415},"",[416,419,422],{"id":417,"depth":57,"text":418},"minor-update-2020-04-22","Minor Update - 2020-04-22",{"id":420,"depth":57,"text":421},"more-on-the-codescript","More on the code\u002Fscript",{"id":423,"depth":57,"text":424},"how-to-use","How to use",{"id":426,"status":270,"title":427,"slug":428,"excerpt":429,"coverImage":430,"categories":431,"tags":432,"relatedPhotos":433,"discourseTopicId":434,"discourseEnabled":435,"dateCreated":436,"dateUpdated":437,"cover":438,"posts":469},"47c80f97-4090-4710-b8af-8acd03710633","pfSense ntopng export flows to ELK stack for monitoring","pfsense-ntopng-export-flows-to-elk-stack-for-monitoring","Quick pfSense ntopng fix\u002Fworkaround","26c9dc88-1d5c-417e-8fb0-e287a83c56b6",[30,37],[142],[],"17",true,"2018-08-02T16:00:00.000Z","2023-01-18T04:53:44.939Z",{"id":430,"storage":366,"filename_disk":439,"filename_download":440,"title":441,"type":370,"folder":8,"uploaded_by":371,"created_on":442,"modified_by":8,"modified_on":443,"charset":8,"filesize":444,"width":445,"height":446,"duration":8,"embed":8,"description":8,"location":8,"tags":8,"metadata":447,"focal_point_x":8,"focal_point_y":8,"tus_id":8,"tus_data":8,"uploaded_on":442,"imageSet":448},"26c9dc88-1d5c-417e-8fb0-e287a83c56b6.png","ntopng-kernel-error.png","Ntopng Kernel Error","2023-01-08T04:02:56.889Z","2023-01-08T04:02:57.130Z","179314",2278,426,{},{"sourceFingerprint":449,"transformVersion":100,"seoSlug":428,"hash":450,"original":451,"variants":453},"26c9dc88-1d5c-417e-8fb0-e287a83c56b6:2023-01-08T04:02:57.130Z:179314:26c9dc88-1d5c-417e-8fb0-e287a83c56b6.png","3c8ee5bffe688bd1",{"key":452,"width":445,"height":446,"contentType":370},"assets\u002F26c9dc88-1d5c-417e-8fb0-e287a83c56b6\u002F3c8ee5bffe688bd1\u002Foriginal.png",[454,457,460,463,466],{"key":455,"width":386,"height":456,"contentType":388},"assets\u002F26c9dc88-1d5c-417e-8fb0-e287a83c56b6\u002F3c8ee5bffe688bd1\u002Fpfsense-ntopng-export-flows-to-elk-stack-for-monitoring-320-5898efe2b290.webp",60,{"key":458,"width":391,"height":459,"contentType":388},"assets\u002F26c9dc88-1d5c-417e-8fb0-e287a83c56b6\u002F3c8ee5bffe688bd1\u002Fpfsense-ntopng-export-flows-to-elk-stack-for-monitoring-640-5a1fd8afdf8c.webp",120,{"key":461,"width":395,"height":462,"contentType":388},"assets\u002F26c9dc88-1d5c-417e-8fb0-e287a83c56b6\u002F3c8ee5bffe688bd1\u002Fpfsense-ntopng-export-flows-to-elk-stack-for-monitoring-960-034b746d1059.webp",180,{"key":464,"width":399,"height":465,"contentType":388},"assets\u002F26c9dc88-1d5c-417e-8fb0-e287a83c56b6\u002F3c8ee5bffe688bd1\u002Fpfsense-ntopng-export-flows-to-elk-stack-for-monitoring-1440-35da7257e1c5.webp",269,{"key":467,"width":403,"height":468,"contentType":388},"assets\u002F26c9dc88-1d5c-417e-8fb0-e287a83c56b6\u002F3c8ee5bffe688bd1\u002Fpfsense-ntopng-export-flows-to-elk-stack-for-monitoring-2048-8b818d61fb07.webp",383,[470],{"id":471,"number":46,"subtitle":8,"path":472},"5b1bba45-ad4a-451f-ba13-8f514b658c70","content\u002Fposts\u002Fpfsense-ntopng-export-flows-to-elk-stack-for-monitoring\u002F01.md",{"id":474,"status":270,"title":475,"slug":476,"excerpt":477,"coverImage":478,"categories":479,"tags":480,"relatedPhotos":481,"discourseTopicId":482,"discourseEnabled":362,"dateCreated":483,"dateUpdated":484,"cover":485,"posts":515},"2faf379b-9988-4d91-820f-3325fd48d56a","Discourse Memory on DigitalOcean Droplet Swap","discourse-memory-on-digitalocean-droplet-swap","Troubleshooting a Discourse instance hosted on the cloud, and using SNMP to find out why","a5c386d3-6303-4e59-a8c1-76214207b21d",[30],[62,105,110],[],"19","2019-08-18T16:00:00.000Z","2023-01-08T04:47:20.261Z",{"id":478,"storage":366,"filename_disk":486,"filename_download":487,"title":488,"type":370,"folder":8,"uploaded_by":371,"created_on":489,"modified_by":8,"modified_on":490,"charset":8,"filesize":491,"width":492,"height":493,"duration":8,"embed":8,"description":8,"location":8,"tags":8,"metadata":494,"focal_point_x":8,"focal_point_y":8,"tus_id":8,"tus_data":8,"uploaded_on":489,"imageSet":495},"a5c386d3-6303-4e59-a8c1-76214207b21d.png","discourse-discord-notify.png","Discourse Discord Notify","2023-01-08T04:32:57.902Z","2023-01-08T04:32:58.111Z","332997",1606,1644,{},{"sourceFingerprint":496,"transformVersion":100,"seoSlug":476,"hash":497,"original":498,"variants":500},"a5c386d3-6303-4e59-a8c1-76214207b21d:2023-01-08T04:32:58.111Z:332997:a5c386d3-6303-4e59-a8c1-76214207b21d.png","370e0a6142164200",{"key":499,"width":492,"height":493,"contentType":370},"assets\u002Fa5c386d3-6303-4e59-a8c1-76214207b21d\u002F370e0a6142164200\u002Foriginal.png",[501,504,507,510,513],{"key":502,"width":503,"height":386,"contentType":388},"assets\u002Fa5c386d3-6303-4e59-a8c1-76214207b21d\u002F370e0a6142164200\u002Fdiscourse-memory-on-digitalocean-droplet-swap-320-a46fc4d8255d.webp",313,{"key":505,"width":506,"height":391,"contentType":388},"assets\u002Fa5c386d3-6303-4e59-a8c1-76214207b21d\u002F370e0a6142164200\u002Fdiscourse-memory-on-digitalocean-droplet-swap-640-da07969d668b.webp",625,{"key":508,"width":509,"height":395,"contentType":388},"assets\u002Fa5c386d3-6303-4e59-a8c1-76214207b21d\u002F370e0a6142164200\u002Fdiscourse-memory-on-digitalocean-droplet-swap-960-5f03bc7907a2.webp",938,{"key":511,"width":512,"height":399,"contentType":388},"assets\u002Fa5c386d3-6303-4e59-a8c1-76214207b21d\u002F370e0a6142164200\u002Fdiscourse-memory-on-digitalocean-droplet-swap-1440-4124f7c79227.webp",1407,{"key":514,"width":492,"height":493,"contentType":388},"assets\u002Fa5c386d3-6303-4e59-a8c1-76214207b21d\u002F370e0a6142164200\u002Fdiscourse-memory-on-digitalocean-droplet-swap-1644-27bd34d07ae5.webp",[516],{"id":517,"number":46,"subtitle":8,"path":518},"d9d2f81d-1b40-4a9f-9507-864a77089058","content\u002Fposts\u002Fdiscourse-memory-on-digitalocean-droplet-swap\u002F01.md",{"categories":520,"tags":526,"photoTags":559,"galleries":580,"blogCount":285,"photoCount":286},[521,522,523,524,525],{"id":6,"date_created":7,"date_updated":8,"name":9,"slug":10,"description":8,"count":11},{"id":13,"date_created":14,"date_updated":8,"name":15,"slug":16,"description":17,"count":18},{"id":20,"date_created":21,"date_updated":8,"name":22,"slug":23,"description":24,"count":25},{"id":27,"date_created":28,"date_updated":8,"name":29,"slug":30,"description":31,"count":32},{"id":34,"date_created":35,"date_updated":8,"name":36,"slug":37,"description":38,"count":39},[527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558],{"id":42,"date_created":43,"date_updated":8,"name":44,"slug":45,"count":46},{"id":48,"date_created":49,"date_updated":8,"name":50,"slug":51,"count":32},{"id":53,"date_created":54,"date_updated":8,"name":55,"slug":56,"count":57},{"id":59,"date_created":60,"date_updated":8,"name":61,"slug":62,"count":57},{"id":64,"date_created":65,"date_updated":8,"name":66,"slug":67,"count":57},{"id":69,"date_created":70,"date_updated":8,"name":71,"slug":72,"count":46},{"id":74,"date_created":75,"date_updated":8,"name":76,"slug":77,"count":46},{"id":79,"date_created":80,"date_updated":8,"name":81,"slug":82,"count":57},{"id":84,"date_created":85,"date_updated":8,"name":86,"slug":87,"count":46},{"id":89,"date_created":90,"date_updated":91,"name":92,"slug":93,"count":94},{"id":96,"date_created":97,"date_updated":8,"name":98,"slug":99,"count":100},{"id":102,"date_created":103,"date_updated":8,"name":104,"slug":105,"count":57},{"id":107,"date_created":108,"date_updated":8,"name":109,"slug":110,"count":100},{"id":112,"date_created":113,"date_updated":8,"name":114,"slug":115,"count":46},{"id":117,"date_created":118,"date_updated":8,"name":119,"slug":120,"count":121},{"id":123,"date_created":124,"date_updated":8,"name":125,"slug":126,"count":121},{"id":128,"date_created":129,"date_updated":8,"name":130,"slug":131,"count":100},{"id":133,"date_created":134,"date_updated":8,"name":135,"slug":136,"count":137},{"id":139,"date_created":140,"date_updated":8,"name":141,"slug":142,"count":100},{"id":144,"date_created":145,"date_updated":8,"name":146,"slug":147,"count":137},{"id":149,"date_created":150,"date_updated":8,"name":151,"slug":152,"count":57},{"id":154,"date_created":155,"date_updated":8,"name":156,"slug":157,"count":137},{"id":159,"date_created":160,"date_updated":8,"name":161,"slug":162,"count":163},{"id":165,"date_created":166,"date_updated":8,"name":167,"slug":168,"count":137},{"id":170,"date_created":171,"date_updated":8,"name":172,"slug":173,"count":100},{"id":175,"date_created":176,"date_updated":8,"name":177,"slug":178,"count":46},{"id":180,"date_created":181,"date_updated":8,"name":182,"slug":183,"count":46},{"id":185,"date_created":186,"date_updated":8,"name":187,"slug":188,"count":189},{"id":191,"date_created":192,"date_updated":8,"name":193,"slug":194,"count":46},{"id":196,"date_created":197,"date_updated":198,"name":199,"slug":200,"count":46},{"id":202,"date_created":203,"date_updated":204,"name":205,"slug":206,"count":137},{"id":208,"date_created":209,"date_updated":8,"name":210,"slug":211,"count":57},[560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579],{"id":214,"date_created":215,"date_updated":8,"name":216,"slug":217,"count":46},{"id":48,"date_created":49,"date_updated":8,"name":50,"slug":51,"count":46},{"id":74,"date_created":75,"date_updated":8,"name":76,"slug":77,"count":57},{"id":221,"date_created":222,"date_updated":8,"name":223,"slug":224,"count":46},{"id":226,"date_created":227,"date_updated":8,"name":228,"slug":229,"count":39},{"id":89,"date_created":90,"date_updated":91,"name":92,"slug":93,"count":231},{"id":96,"date_created":97,"date_updated":8,"name":98,"slug":99,"count":233},{"id":117,"date_created":118,"date_updated":8,"name":119,"slug":120,"count":137},{"id":123,"date_created":124,"date_updated":8,"name":125,"slug":126,"count":236},{"id":238,"date_created":239,"date_updated":8,"name":240,"slug":241,"count":25},{"id":133,"date_created":134,"date_updated":8,"name":135,"slug":136,"count":243},{"id":154,"date_created":155,"date_updated":8,"name":156,"slug":157,"count":245},{"id":159,"date_created":160,"date_updated":8,"name":161,"slug":162,"count":100},{"id":165,"date_created":166,"date_updated":8,"name":167,"slug":168,"count":189},{"id":249,"date_created":250,"date_updated":8,"name":251,"slug":252,"count":121},{"id":175,"date_created":176,"date_updated":8,"name":177,"slug":178,"count":233},{"id":255,"date_created":256,"date_updated":8,"name":257,"slug":258,"count":46},{"id":180,"date_created":181,"date_updated":8,"name":182,"slug":183,"count":57},{"id":185,"date_created":186,"date_updated":8,"name":187,"slug":188,"count":261},{"id":263,"date_created":264,"date_updated":8,"name":265,"slug":266,"count":57},[581,582],{"id":269,"status":270,"date_created":271,"date_updated":272,"name":273,"description":274,"slug":275,"count":276},{"id":278,"status":270,"date_created":279,"date_updated":280,"name":281,"description":282,"slug":283,"count":284},{"id":357,"title":369,"width":375,"height":376,"filename_download":368,"type":370,"metadata":584,"imageSet":585,"curatedPhoto":8},{},{"sourceFingerprint":379,"transformVersion":100,"seoSlug":355,"hash":380,"original":586,"variants":587},{"key":382,"width":375,"height":376,"contentType":370},[588,589,590,591,592],{"key":385,"width":386,"height":387,"contentType":388},{"key":390,"width":391,"height":392,"contentType":388},{"key":394,"width":395,"height":396,"contentType":388},{"key":398,"width":399,"height":400,"contentType":388},{"key":402,"width":403,"height":404,"contentType":388},1788518276437]