Browse Source

Merge branch 'master' of https://git.lattuga.net/bida/MastodonMegafono

d0c 4 years ago
parent
commit
8ebc9a5c12
2 changed files with 36 additions and 2 deletions
  1. 31 0
      .drone.yml
  2. 5 2
      README.md

+ 31 - 0
.drone.yml

@@ -0,0 +1,31 @@
+kind: pipeline
+type: docker
+name: default
+
+steps:
+  - name: deploy
+    image: appleboy/drone-scp
+    settings:
+      user:
+        from_secret: user
+#      key:
+#        from_secret: ssh_key
+      password:
+        from_secret: passwd
+      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 megafono_bot | grep bash | awk '{print $2}'`
+        - cd ~/MastodonMegafono
+        - bash megafono_bot.sh -f megafono.txt
+        - bash megafono_bot.sh -f supportabida.txt
+      

+ 5 - 2
README.md

@@ -1,7 +1,10 @@
-# 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` 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:
+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