From b62c32998e04e9174d6495128804f084d5b61722 Mon Sep 17 00:00:00 2001 From: tubia Date: Sun, 8 Dec 2019 17:39:20 +0100 Subject: [PATCH 01/18] Add .drone.yml Add .drone.yml for the pipeline control --- .drone.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..9bcdb11 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,15 @@ +kind: pipeline +name: megafono + +steps: + - name: deploy + image: drillster/drone-rsync + hosts: ["mastodon.bida.im"] + user: + from_secret: user + key: + from_secret: ssh_key + source: ./ + target: ~/MastodonMegafono + script: + - touch prova \ No newline at end of file From 53290fefbae85ae180acc7c5ca2ac1de202a46be Mon Sep 17 00:00:00 2001 From: tubia Date: Mon, 9 Dec 2019 16:47:17 +0100 Subject: [PATCH 02/18] Update '.drone.yml' --- .drone.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9bcdb11..41ad8a1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,12 +4,14 @@ name: megafono steps: - name: deploy image: drillster/drone-rsync - hosts: ["mastodon.bida.im"] - user: - from_secret: user - key: - from_secret: ssh_key - source: ./ - target: ~/MastodonMegafono - script: - - touch prova \ No newline at end of file + settings: + hosts: + - mastodon.bida.im + user: + from_secret: user + key: + from_secret: ssh_key + source: ./ + target: ~/MastodonMegafono + script: + - touch prova \ No newline at end of file From e1041fd0cc10863b0ab683d2ac1bbdd1c605703f Mon Sep 17 00:00:00 2001 From: tubia Date: Mon, 9 Dec 2019 17:04:47 +0100 Subject: [PATCH 03/18] Update '.drone.yml' --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 41ad8a1..1d05278 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,4 +1,5 @@ kind: pipeline +type: docker name: megafono steps: From 9d9db828305973c4cb617685c5d1a03738d20588 Mon Sep 17 00:00:00 2001 From: tubia Date: Mon, 9 Dec 2019 17:09:53 +0100 Subject: [PATCH 04/18] Update '.drone.yml' --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 1d05278..55e309e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,6 @@ kind: pipeline type: docker -name: megafono +name: default steps: - name: deploy From f7adb4d6a89db114f2c71f4d1c920e0cd9960295 Mon Sep 17 00:00:00 2001 From: tubia Date: Tue, 10 Dec 2019 12:05:44 +0100 Subject: [PATCH 05/18] Update 'README.md' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0564430..f3ce344 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Megafono Mastodon Bida Il bot megafono prende linea per linea da un file che può essere configurato settando `DATA_FILE` in `megafono_bot.sh`. -Ogni linea del file è evalutata con `eval ./toot.sh $line` quindi ATTENZIONE: +Ogni linea del file è evalutata con `eval ./toot.sh $line` quindi **ATTENZIONE**: - bisogna eseguire il bot dalla directory in cui si trova perchè usa il path relativo, se vi da fastidio questo settate i path assoluti modificando lo script From 2808c9354b0452a86e915e2217245b0e96a8829c Mon Sep 17 00:00:00 2001 From: tubia Date: Wed, 11 Dec 2019 16:03:10 +0100 Subject: [PATCH 06/18] Update 'README.md' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f3ce344..a82368c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Megafono Mastodon Bida +# Megafono Mastodon Bida [![Build Status](https://drone.bida.im/api/badges/bida/MastodonMegafono/status.svg)](https://drone.bida.im/bida/MastodonMegafono) Il bot megafono prende linea per linea da un file che può essere configurato settando `DATA_FILE` in `megafono_bot.sh`. Ogni linea del file è evalutata con `eval ./toot.sh $line` quindi **ATTENZIONE**: From c7ed831e89a8ca140ef9916b50b6b64b9bfd5e1c Mon Sep 17 00:00:00 2001 From: tubia Date: Wed, 11 Dec 2019 16:27:09 +0100 Subject: [PATCH 07/18] Update 'README.md' --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index a82368c..87eac55 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Megafono Mastodon Bida [![Build Status](https://drone.bida.im/api/badges/bida/MastodonMegafono/status.svg)](https://drone.bida.im/bida/MastodonMegafono) +Il bot megafono prende linea per linea da un file che può essere configurato settando `DATA_FILE` in `megafono_bot.sh` o passato come primo argomento. + +#### ~ Vecchia spiegazione dello script ~ Il bot megafono prende linea per linea da un file che può essere configurato settando `DATA_FILE` in `megafono_bot.sh`. Ogni linea del file è evalutata con `eval ./toot.sh $line` quindi **ATTENZIONE**: From 4658d1e69ad25f6f4128e4015fb4c810d0d92b91 Mon Sep 17 00:00:00 2001 From: tubia Date: Wed, 11 Dec 2019 16:46:53 +0100 Subject: [PATCH 08/18] Update '.drone.yml' --- .drone.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 55e309e..b674794 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,13 +5,14 @@ name: default steps: - name: deploy image: drillster/drone-rsync + environment: + RSYNC_KEY: + from_secret: ssh_key + RSYNC_USER: + from_secret: user settings: hosts: - mastodon.bida.im - user: - from_secret: user - key: - from_secret: ssh_key source: ./ target: ~/MastodonMegafono script: From ba037ea12837c24f80652573f36d51b4e9149a22 Mon Sep 17 00:00:00 2001 From: tubia Date: Wed, 11 Dec 2019 17:07:32 +0100 Subject: [PATCH 09/18] Update '.drone.yml' --- .drone.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index b674794..1d0c193 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,16 +4,13 @@ name: default steps: - name: deploy - image: drillster/drone-rsync - environment: - RSYNC_KEY: - from_secret: ssh_key - RSYNC_USER: - from_secret: user + image: appleboy/drone-scp settings: - hosts: + user: + from_secret: user + key: + from_secret: ssh_key + host: - mastodon.bida.im source: ./ - target: ~/MastodonMegafono - script: - - touch prova \ No newline at end of file + target: ~/MastodonMegafono \ No newline at end of file From 6a042a29f0d786d1eb09978d93122e2f4d64bd39 Mon Sep 17 00:00:00 2001 From: tubia Date: Wed, 11 Dec 2019 17:17:16 +0100 Subject: [PATCH 10/18] Update '.drone.yml' --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 1d0c193..732af7a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,7 +6,7 @@ steps: - name: deploy image: appleboy/drone-scp settings: - user: + username: from_secret: user key: from_secret: ssh_key From e3b9cad964cac3832bc4c848b5788cf62a5a3392 Mon Sep 17 00:00:00 2001 From: tubia Date: Wed, 11 Dec 2019 17:36:23 +0100 Subject: [PATCH 11/18] Update '.drone.yml' --- .drone.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 732af7a..c7ae87e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,11 +6,10 @@ steps: - name: deploy image: appleboy/drone-scp settings: - username: + user: from_secret: user key: from_secret: ssh_key - host: - - mastodon.bida.im + host: mastodon.bida.im source: ./ target: ~/MastodonMegafono \ No newline at end of file From c09ddd6a459910022044bde8fcd2ea4e808278be Mon Sep 17 00:00:00 2001 From: tubia Date: Wed, 11 Dec 2019 17:39:41 +0100 Subject: [PATCH 12/18] Update '.drone.yml' --- .drone.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index c7ae87e..d44c00a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,4 +12,5 @@ steps: from_secret: ssh_key host: mastodon.bida.im source: ./ - target: ~/MastodonMegafono \ No newline at end of file + target: ~/MastodonMegafono + \ No newline at end of file From 746f7144a9a6db3586c9b431a99e6a4156706db3 Mon Sep 17 00:00:00 2001 From: tubia Date: Wed, 11 Dec 2019 17:52:01 +0100 Subject: [PATCH 13/18] Update '.drone.yml' --- .drone.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index d44c00a..4aa341d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,8 +8,10 @@ steps: settings: user: from_secret: user - key: - from_secret: ssh_key +# key: +# from_secret: ssh_key + password: + from_secret: passwd host: mastodon.bida.im source: ./ target: ~/MastodonMegafono From 20636ca7d2a2aa8fc9fd0b4149f57be28496350c Mon Sep 17 00:00:00 2001 From: tubia Date: Wed, 11 Dec 2019 18:26:55 +0100 Subject: [PATCH 14/18] test con key --- .drone.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 4aa341d..cc2056d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,10 +8,10 @@ steps: settings: user: from_secret: user -# key: -# from_secret: ssh_key - password: - from_secret: passwd + key: + from_secret: ssh_key +# password: +# from_secret: passwd host: mastodon.bida.im source: ./ target: ~/MastodonMegafono From 0053acdf10aa0a9019a5fc08aeb9c2d5ecd122c1 Mon Sep 17 00:00:00 2001 From: tubia Date: Wed, 11 Dec 2019 18:28:14 +0100 Subject: [PATCH 15/18] fallback alla password per login bida --- .drone.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index cc2056d..4aa341d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,10 +8,10 @@ steps: settings: user: from_secret: user - key: - from_secret: ssh_key -# password: -# from_secret: passwd +# key: +# from_secret: ssh_key + password: + from_secret: passwd host: mastodon.bida.im source: ./ target: ~/MastodonMegafono From 2f561e4d826e058b656fc2ffa5df4094278c5560 Mon Sep 17 00:00:00 2001 From: tubia Date: Thu, 12 Dec 2019 15:35:25 +0100 Subject: [PATCH 16/18] Update '.drone.yml' --- .drone.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.drone.yml b/.drone.yml index 4aa341d..f7cd59a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,4 +15,17 @@ steps: host: mastodon.bida.im source: ./ target: ~/MastodonMegafono + - name: run + image: appleboy/drone-ssh + settings: + user: + from_secret: user + password: + from_secret: passwd + host: mastodon.bida.im + script: + - kill -9 `ps aufx | grep mega | grep bash | awk '{print $2}'` + - cd ~/MastodonMegafono + - nohup bash megafono_bot.sh -f megafono.txt & + - nohup bash megafono_bot.sh -f supportabida.txt & \ No newline at end of file From 0fdf21ba47577fa5d1cfd6e99437676f6a08b54c Mon Sep 17 00:00:00 2001 From: tubia Date: Thu, 12 Dec 2019 15:42:14 +0100 Subject: [PATCH 17/18] Update '.drone.yml' --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index f7cd59a..52f6cbc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -24,7 +24,7 @@ steps: from_secret: passwd host: mastodon.bida.im script: - - kill -9 `ps aufx | grep mega | grep bash | awk '{print $2}'` + - kill -9 `ps aufx | grep megafono_bot | grep bash | awk '{print $2}'` - cd ~/MastodonMegafono - nohup bash megafono_bot.sh -f megafono.txt & - nohup bash megafono_bot.sh -f supportabida.txt & From d43ff8cffc1286642554c22dafaa117e6c4f6981 Mon Sep 17 00:00:00 2001 From: tubia Date: Thu, 12 Dec 2019 17:00:32 +0100 Subject: [PATCH 18/18] Update '.drone.yml' --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 52f6cbc..4b05bf4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,6 +26,6 @@ steps: script: - kill -9 `ps aufx | grep megafono_bot | grep bash | awk '{print $2}'` - cd ~/MastodonMegafono - - nohup bash megafono_bot.sh -f megafono.txt & - - nohup bash megafono_bot.sh -f supportabida.txt & + - bash megafono_bot.sh -f megafono.txt + - bash megafono_bot.sh -f supportabida.txt \ No newline at end of file