1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mattermost_ynh.git synced 2024-09-03 19:36:29 +02:00
Commit graph

215 commits

Author SHA1 Message Date
Pierre de La Morinerie
2d66f1b930
Merge pull request #282 from YunoHost-Apps/Add---purge-option 2021-11-07 12:36:55 +01:00
Pierre de La Morinerie
b20163105d scripts: skip user and team creation if mmctl is missing
mmctl is not available for ARM builds yet.

See #306
2021-11-05 16:43:05 +01:00
ericgaspar
aca1f2c9f2
Merge branch 'testing' into Add---purge-option 2021-11-05 11:22:14 +01:00
Pierre de La Morinerie
0aa89327da scripts: use an absolute path when invoking mmctl
It seems on some distros (like Raspian), the current working directory
is not preserved accross sudo invocations, which causes an "bin/mmctl
not found" error.

Fix #304
2021-11-05 11:08:20 +01:00
Pierre de La Morinerie
5af7f2183f scripts: fix the syntax for adding a user to a team 2021-11-01 22:41:51 +01:00
Pierre de La Morinerie
f983391fb7 scripts: create and confirm the first user in the same step 2021-11-01 22:41:51 +01:00
Pierre de La Morinerie
b3647e3db5 config: store the socket file in a writable location
On Yunhost `/var/tmp` is only writable by root.
2021-11-01 22:41:51 +01:00
Pierre de La Morinerie
0bb5458e66 scripts: use newer option name instead of deprecated one 2021-11-01 22:41:51 +01:00
Pierre de La Morinerie
09cc4fbeb1 upgrade: warn about 6.0 lengthy database migrations 2021-10-31 13:05:13 +01:00
Pierre de La Morinerie
940589206b install: replace bin/mattermost by bin/mmctl
`mmctl` is supposed to authenticate as one of the admin users. But since
this is the first user we're creating, there are no admin yet.

So in order to create the first user, we:

1. enable mmctl's "local mode", which connects to the Mattermost server
   through a socket (rather than through the authenticated API), 
2. create the first user and team,
3. disable the "local mode".
2021-10-30 22:06:56 +02:00
ericgaspar
889c13e300
Update remove 2021-10-03 11:24:09 +02:00
Éric Gaspar
73f75150fe
Set rights (#274)
* Set rights
2021-09-16 11:39:20 +02:00
Pierre de La Morinerie
f8589544d5 scripts: warn about lengthy migrations when upgrading to 5.38.0
The release notes of the 5.38.0 version mention two lengthy database
migrations. Make sure users are told what is going on, so that they
don't think the upgrade failed.
2021-08-17 16:28:53 -05:00
ericgaspar
70e4e44c16
Fix linter warnings 2021-06-23 09:50:55 +02:00
Pierre de La Morinerie
3a3cfdedee scripts: warn about lengthy migration when upgrading from < 5.35 2021-06-15 08:34:59 +02:00
ljf (zamentur)
46630b05a5
[fix] Add not mandatory for data 2021-03-21 23:06:11 +01:00
ljf (zamentur)
b09591eb5e
[fix] AVoid to delete data 2021-03-21 22:18:19 +01:00
ljf (zamentur)
10b3deeec8
[fix] This dir could be in giga 2021-03-21 22:15:35 +01:00
Éric Gaspar
59013d066d
Fix linter (#224)
* Fix linter
* Update manifest.json
* Set password variable to smtp_user_pwd
* Fix doc link
2021-03-17 20:59:57 +01:00
Alexandre Aubin
1a0e23b8a4
Fix backward compatibilty for db_name 2021-01-31 11:30:25 +01:00
ericgaspar
84b90878c0
Update install 2021-01-28 17:04:45 +01:00
ericgaspar
7d830c3758
Update install 2021-01-28 17:02:43 +01:00
ericgaspar
ccf9375210
Update change_url 2021-01-18 13:28:22 +01:00
ericgaspar
3949045746
Update change_url 2021-01-17 23:47:36 +01:00
ericgaspar
9f72ea137c
Update change_url 2021-01-17 23:34:03 +01:00
ericgaspar
6da9363749
Create change_url 2021-01-17 19:41:16 +01:00
Éric Gaspar
9c3a0960f6
Update scripts/backup
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
2021-01-14 12:20:53 +01:00
Éric Gaspar
504697a984
Update scripts/upgrade
Co-authored-by: Kayou <pierre@kayou.io>
2021-01-14 08:36:16 +01:00
Éric Gaspar
ad1ebec045
Update scripts/upgrade
Co-authored-by: Kayou <pierre@kayou.io>
2021-01-14 08:35:56 +01:00
Éric Gaspar
fc6a600bb9
Add Team and Enterprise (#202)
* Add Team/Entreprise install
2021-01-13 11:31:12 +01:00
ericgaspar
43bf44ff01
Remove change_url 2021-01-12 12:03:18 +01:00
ericgaspar
8030559337
Add missing variables 2021-01-12 11:12:37 +01:00
Éric Gaspar
c425aa5d94
Arm arch. support (#201)
* Add ARM sources
* Switch to TEAM edition
2021-01-12 10:33:02 +01:00
ericgaspar
7586f58759
Cleaning up 2021-01-12 00:01:16 +01:00
Éric Gaspar
705b3da0e7
repackage (#200)
* repackage
2021-01-11 23:46:48 +01:00
Pierre de La Morinerie
6826e253b4 scripts: use a per-instance db username
The scripts still uses "mmuser" by default, for retro-compatibility.
2020-02-18 22:31:15 +01:00
Pierre de La Morinerie
24261f8b7f Merge remote-tracking branch 'origin/master' into testing 2020-02-14 14:43:46 +01:00
Pierre de La Morinerie
efbe7c8dad scripts: fix SMTP port on install
Fix #156
2020-02-14 14:37:35 +01:00
Pierre de La Morinerie
f00398be3c scripts: use helper for generating random passwords 2020-02-10 01:39:37 +01:00
Pierre de La Morinerie
d460d7f2bd scripts: disable questionnable password complexity rules
Enforcing password complexity rules is usually useless, and encourages
bad security.

However, this is not our main issue. The problem is that when installing
Mattermost on Yunohost, if the user chooses a password that doesn't
fullfil all these requirements, the installation will fail with a hard-
to-spot error message.

We don't want this to happen, so we relax the rules a little.

Fix #159
2020-02-10 00:47:38 +01:00
Pierre de La Morinerie
66d31e3171 scripts: use ynh_replace_string instead of sed -i 2020-02-10 00:17:56 +01:00
Pierre de La Morinerie
fefff41733 scripts: remove all usages of sudo
The scripts are already run as root.
2020-02-09 01:07:59 +01:00
Pierre de La Morinerie
e526f969a9 scripts: remove the service before removing the systemd config
Yunohost complains if the systemd unit doesn't exist when removing
the service.
2020-02-09 01:07:59 +01:00
Pierre de La Morinerie
f07b4a7822 app: implement subpath support 2020-02-09 01:07:59 +01:00
Pierre de La Morinerie
cc047cc1c1
Merge pull request #141 from YunoHost-Apps/testing
Fix package_linter error
2019-06-17 09:39:07 +02:00
yalh76
7dacf55dfe
Fix package_linter error 2019-05-24 04:59:14 +02:00
Pierre de La Morinerie
9f19e0c550 Replace invokations of bin/platform to bin/mattermost 2018-07-12 08:30:47 +02:00
Pierre de La Morinerie
331fcce8c5 conf: use a Type=notify systemd service
Starting from Mattermost 4.8, the server process sends a systemd
notification when it is ready to accept network connections. Thus we
don't need to explicitely wait for the port to be open in the service.

As a bonus, by removing the hack, we don't need to replace `__PORT__` in
the service anymore–which means the associated script helper can be
removed too.
2018-03-16 18:37:17 +05:30
Pierre de La Morinerie
15e19ce6c9 Create first user and team from the app install 2018-02-16 19:27:04 +05:30
Pierre de La Morinerie
cad4712038 upgrade: attempt to restore backup only if it was correctly saved 2018-02-05 10:37:42 +05:30
Pierre de La Morinerie
3c9e53fe57 scripts: rename smtp_user to mattermost_user 2018-01-31 11:42:52 +05:30
Pierre de La Morinerie
256cafcb07 scripts: support multi-instance install 2018-01-31 11:42:52 +05:30
Pierre de La Morinerie
0918978e92 scripts: handle port in use 2018-01-31 11:42:52 +05:30
Pierre de La Morinerie
aa7721322d scripts: modernize the publix/private switch
This allow package_check to properly test it.
2018-01-31 11:42:52 +05:30
Pierre de La Morinerie
3a6b0c752b scripts: fix restoration of smtp user password 2018-01-30 12:14:57 +05:30
Pierre de La Morinerie
cbf70d12c5 scripts: modernize backup script 2018-01-29 11:37:06 +05:30
Pierre de La Morinerie
ac0637da3f scripts: backup Mattermost data files
Fix #79
2018-01-29 11:37:03 +05:30
Pierre de La Morinerie
d2566887a8 upgrade: use app.src 2017-10-23 12:22:40 +05:30
frju365
bede450e88 install: use app.src 2017-10-23 12:22:33 +05:30
Pierre de La Morinerie
b4f05f6449 scripts: move logs to a subdirectory of /var/log
This allows to give permission to the `mattermost` user to
write new files in this subdirectory, which is needed for
log rotation.

Fix #61
2017-10-17 10:36:25 +05:30
Pierre de La Morinerie
d79c4fcfe4 scripts: advertise service in admin panel 2017-10-16 09:14:20 +05:30
Pierre de La Morinerie
e8c51d4715 scripts: use systemd rather than supervisor
Systemd is now the standard way of doing services in
Yunohost. It also avoids to install an extra dependency.

Fix #43
2017-10-16 09:05:21 +05:30
Pierre de La Morinerie
bcb5f88e95 install: configure SiteURL
This is a mandatory variable since Mattermost 3.8.

See https://docs.mattermost.com/administration/config-settings.html#site-url

Fix #50
2017-10-12 12:53:55 +05:30
Pierre de La Morinerie
6e15ed6634 restore: replace deprecated yunohost app checkurl 2017-10-12 12:27:10 +05:30
Pierre de La Morinerie
f6bef01487 restore: improve comments 2017-10-12 12:27:10 +05:30
Pierre de La Morinerie
faa51975af upgrade: backup before upgrading, and restore backup on failure 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
ee7b6a1522 upgrade: improve comments 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
f781efb160 scripts: use ynh_add_nginx_config helper 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
a0a9fe6ab7 remove: use ynh_system_user_delete helper 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
f2013abebc remove: use ynh_mysql_remove_db helper 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
1a40ff1eed remove: use more variables instead of hardcoded values 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
c2e27b9764 remove: improve comments 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
f1b741980f install: remove the custom error handler
Yunohost will automatically execute the `remove` script anyway
after a failed install.
2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
e37638f2f8 install: modernize script with Yunohost 2.6.4 helpers 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
f524bd7940 install: improve comments 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
c51127e1eb install: don’t fail to remove database if not exist 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
533f10d93b install: don’t print an error if archive doesn’t exist 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
9286fe5e85 install: install error handler before creating the database 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
51b8880157 install: use the $YNH_APP_INSTANCE_NAME variable 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
ee502444c6 install: modernize checking for domain availability 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
cc846f64b4 Fix logs location
The log location used to be a filename, but it is now a
path since Mattermost 3.8.

Having a path was tolerated in Mattermost <= 4.1, but crashes
the server starting from Mattermost 4.2.0.
2017-10-10 17:04:43 +05:30
Pierre de La Morinerie
a4530ddb0f Merge pull request #46 from YunoHost-Apps/fix-linter
scripts: use `ynh_abort_if_errors` helper
2017-10-10 16:40:58 +05:30
Pierre de La Morinerie
ebaea2dbda scripts: use ynh_abort_if_errors helper 2017-10-10 16:36:28 +05:30
Pierre de La Morinerie
4815a948a8 restore: update SSOWAT configuration 2017-10-10 16:33:27 +05:30
Pierre de La Morinerie
7c20359731 script: fix linter warning in install script 2017-09-12 17:24:44 +05:30
Pierre de La Morinerie
752b049866 upgrade: don’t warn when the archive file doesn’t exist 2017-09-12 15:30:38 +05:30
Pierre de La Morinerie
ca8a3c761d upgrade: stop the server after downloading the new release
This will minimize downtime.
2017-09-12 15:30:38 +05:30
Pierre de La Morinerie
ff4f8ba8fd upgrade: fix syntax error in the die_command variable 2017-09-12 15:30:38 +05:30
Pierre de La Morinerie
75fff3fd95 scripts: don’t warn when supervisor config file doesn’t exist 2017-09-12 15:07:56 +05:30
Pierre de La Morinerie
d0b367752a scripts: add restore script 2017-09-12 15:05:18 +05:30
Pierre de La Morinerie
99f7d88424 scripts: modernize backup script 2017-09-11 12:53:22 +05:30
Pierre de La Morinerie
cb0d4ddc75 scripts: modernize and fix linter warnings 2017-09-11 12:53:22 +05:30
Pierre de La Morinerie
30ed4e710e scripts: exit on unbound variables
Fixes a package_linter warning.
2017-09-11 12:53:22 +05:30
Pierre de La Morinerie
24c2e935bd Merge pull request #28 from YunoHost-Apps/analytics
Kick out analytics
2017-07-25 18:20:28 +02:00
kemenaran
aaec1ec07c Update nginx configuration file on upgrade 2017-07-21 22:08:33 +02:00
kemenaran
c630f9f02c backup: fix double-slash in path 2017-07-20 13:20:30 +02:00
kemenaran
09d3768a2c backup: add progress messages 2017-07-20 13:20:08 +02:00
Maniack Crudelis
0b8076404d Store the parameter 2017-05-25 13:33:08 +02:00
Maniack Crudelis
5c98644659 Optionnal analytics 2017-05-25 13:23:26 +02:00
Maniack Crudelis
51304ddaea Kick out analytics
Following https://github.com/YunoHost-Apps/mattermost_ynh/issues/26
2017-05-24 12:29:01 +02:00
Pierre de La Morinerie
4b2890ba1d Remove hard dependency on MySQL 2017-01-03 15:44:12 +00:00
Pierre de La Morinerie
046af1f472 Fix extra slash in install script 2016-05-23 07:41:12 +02:00
Pierre de La Morinerie
ed8d078d8e Use the new Mattermost download URL 2016-04-17 18:35:42 +02:00
Pierre de La Morinerie
60a0e984f5 Fix upgrade script failure handler 2016-04-17 18:03:21 +02:00
Pierre de La Morinerie
a317cb77f8 Add upgrade script 2015-11-18 17:24:09 +01:00
Pierre de La Morinerie
d1d19fcba7 Add backup script (no restore yet) 2015-11-18 17:24:09 +01:00
Pierre de La Morinerie
ecd798be78 Fix typo in datapath setting 2015-11-18 17:24:09 +01:00
Pierre de La Morinerie
09fe73d6b4 Save install domain to settings 2015-11-18 17:24:09 +01:00
Pierre de La Morinerie
6f24a90e47 Download compiled binaries at install time
And avoid including compiled binaries in the source tree. The previously
committed binaries have been removed from the git history.

Fix #1
2015-11-01 19:55:13 +01:00
Pierre de La Morinerie
b138752237 Put uploaded files outside of source directory 2015-10-31 18:01:49 +01:00
Pierre de La Morinerie
242e887fdf More install checks 2015-10-21 16:24:51 +02:00
Pierre de La Morinerie
f614cb00dd Log to file 2015-10-21 14:46:47 +02:00
Pierre de La Morinerie
3a18af006e Remove obsolete upgrade-sources script 2015-10-21 14:46:34 +02:00
Pierre de La Morinerie
e11d51b3b7 Better install; email notifications 2015-10-21 14:33:49 +02:00
Pierre de La Morinerie
9d56b71ee4 First version 2015-10-21 13:03:49 +02:00