Hi There,
Today I started the installation of mattermost on Ubuntu 16.04, since Ubuntu 16.04 is using systemd instead of init I need to create a script that can start up MM on boot.
This is what I got so far:
[Unit]
Description=Starting Mattermost -
[Service]
Type=oneshot
ExecStart=/opt/mattermost/bin/platform
ExecStop=/bin/kill -9 $MAINPID
[Install]
WantedBy=multi-user.target
When running “systemctl start mattermost.service” I get the following output:
mattermost.service - Starting Mattermost -
Loaded: loaded (/lib/systemd/system/mattermost.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2016-05-18 12:24:55 UTC; 12s ago
Process: 8785 ExecStart=/opt/mattermost/bin/platform (code=exited, status=2)
Main PID: 8785 (code=exited, status=2)
May 18 12:24:55 bergpolder platform[8785]: github.com/mattermost/platform/utils.InitTranslationsWithDir(0xd891f8, 0x4)
May 18 12:24:55 bergpolder platform[8785]: /var/lib/jenkins/jobs/mattermost-platform-release/workspace/src/github.com/mattermost/platform/utils/i18n.go:33 +0x2ee
May 18 12:24:55 bergpolder platform[8785]: github.com/mattermost/platform/utils.InitTranslations()
May 18 12:24:55 bergpolder platform[8785]: /var/lib/jenkins/jobs/mattermost-platform-release/workspace/src/github.com/mattermost/platform/utils/i18n.go:19 +0x2c
May 18 12:24:55 bergpolder platform[8785]: main.main()
May 18 12:24:55 bergpolder platform[8785]: /var/lib/jenkins/jobs/mattermost-platform-release/workspace/src/github.com/mattermost/platform/mattermost.go:77 +0x2c
May 18 12:24:55 bergpolder systemd[1]: mattermost.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
May 18 12:24:55 bergpolder systemd[1]: Failed to start Starting Mattermost -:).
May 18 12:24:55 bergpolder systemd[1]: mattermost.service: Unit entered failed state.
May 18 12:24:55 bergpolder systemd[1]: mattermost.service: Failed with result ‘exit-code’.
How can I solve this?
Cheers!