Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Mattermost
  3. How start a plugin as a service within Mattermost

How start a plugin as a service within Mattermost

Scheduled Pinned Locked Moved Mattermost
6 Posts 3 Posters 1.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    roru2k20
    wrote on last edited by
    #1

    Good evening,

    how can I start for example mail2most (send Mails to Mattermost) as a service within the app? I can run once in the terminal, but when I close the terminal it shutdown the plugin.

    Can I install it as normal service?

    1 Reply Last reply
    0
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      Aren't mattermost server plugins automatically started by mattermost itself as a child process - https://developers.mattermost.com/integrate/plugins/server/ ?

      1 Reply Last reply
      0
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #3

        Ah, I see, looks like mail2man is not a plugin, it is some sort of service that is run in the background?

        A 'hack' is to have a cron task run every 5 minutes or so to start the service - https://docs.cloudron.io/apps/#cron . Add a script like https://www.akamaras.com/linux/linux-script-to-check-if-a-service-is-running-and-start-it-if-its-stopped/

        R 1 Reply Last reply
        1
        • girishG girish

          Ah, I see, looks like mail2man is not a plugin, it is some sort of service that is run in the background?

          A 'hack' is to have a cron task run every 5 minutes or so to start the service - https://docs.cloudron.io/apps/#cron . Add a script like https://www.akamaras.com/linux/linux-script-to-check-if-a-service-is-running-and-start-it-if-its-stopped/

          R Offline
          R Offline
          roru2k20
          wrote on last edited by
          #4

          @girish that works well, but I have implemented it differently.

          Every five minutes runs the programm and send to Mattermost my mails from different inboxes.

          Thanks for help!

          robiR 1 Reply Last reply
          2
          • R roru2k20

            @girish that works well, but I have implemented it differently.

            Every five minutes runs the programm and send to Mattermost my mails from different inboxes.

            Thanks for help!

            robiR Offline
            robiR Offline
            robi
            wrote on last edited by
            #5

            @roru2k20 Would you mind posting your script so others can find it later? A bit of a how-to as this thread suggests 😉

            Conscious tech

            R 1 Reply Last reply
            0
            • robiR robi

              @roru2k20 Would you mind posting your script so others can find it later? A bit of a how-to as this thread suggests 😉

              R Offline
              R Offline
              roru2k20
              wrote on last edited by
              #6

              @robi oh yeah of course, but it is very easy and and I could have actually thought of it myself. 😄

              #!/bin/bash
              cd /app/data/plugins/mail2most
              ./mail2most -c ./mail2most.conf
              

              This script runs with cron every five minutes to check my mails and send them to the different channels. I have 5 addresses configured and it works fine.

              1 Reply Last reply
              1
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Bookmarks
              • Search