Commit Graph

67 Commits

Author SHA1 Message Date
Gullumluvl 0b74eeb842
Only parse a single line from lscpu to get the Cpu(s) count. Avoid localization. (#879) 2024-12-17 14:02:21 +08:00
cheungtitus d00c2e75d5
Added support of Linux on Mac with ARM processors (#631)
Co-authored-by: TItus Cheung <cheungtitus@kenrui-group.com>
2024-09-09 10:09:20 +08:00
Pablo Ganuza Vidal f953eb623a
Fix verification of ports (#818)
nc needs -p to publish verification code correctly, at least in Debian 12
2024-08-19 08:39:29 +10:00
Derek J. Lambert fc9fbedfac
FIX: Broken config and variable handling in setup script (#693)
* FIX: Variable isn't being set

* DEV: Goodbye tabs, they're probably feeling lonely anyway

* FIX: Variable is never used. No need for command substitution

* FIX: The likelihood of knowing the PID for the script before execution is exceptionally low
2024-08-19 08:35:56 +10:00
Alan Guo Xiang Tan 3596dc1686
FEATURE: Update `discourse-setup` to prompt for MaxMind account ID (#796)
In order to download the free MaxMind GeoLite2 databases, an account ID
and license key is required going forward. This commit updates
`discourse-setup` to start prompting the user to provide the MaxMind
Account ID first before asking for the MaxMind license key. If the user
does not provide the Account ID, the script will not prompt for the
license key as we assume the user has opted out.

We are aware that we don't have a reliable way to test for changes to
the `discourse-setup` script but it is what it is at this point in time.
We intend to invest resources in improving things in the future but now
is not the time.
2024-05-09 15:40:01 +08:00
Jay Pfaffman f98af894ec
Update discourse-setup (#799)
DEV: `./launcher stop` needs to be skipped when in debug mode
2024-05-09 15:19:54 +08:00
SnR 869cdb3672
Removing the -p from the "nc" command. (#697)
Removing the -p from the "nc" command.
Reason:
# nc -w 4 -l -p 80
nc: cannot use -p and -l

Without -p it works just fine.

> -l' Used to specify that nc should listen for an incoming connection rather than initiate a connection to a remote host. It is an error to use this option in conjunction with the -p, -s, or -z options. Additionally, any timeouts specified with the -w option are ignored.
2024-04-04 10:23:47 +08:00
Steffy Fort 23e03a1ee1
Fix: Remove egrep for grep -E (#680)
Co-authored-by: Steffy Fort <steffy.fort@cozycloud.cc>
2024-03-21 05:54:55 +08:00
BigEd 246f03b461
fixup count of physical cores in discourse-setup (#739)
See also PR #702 for branch master
2023-10-09 15:47:25 +02:00
Jarek Radosz 32d40fc924
FIX: Update the macOS memory check (#632)
`free` is not available by default on macOS
2022-06-14 00:10:43 +02:00
Gabe Pacuilla 241a42ce71
DEV: Ensure secure file permissions by default (#627)
`discourse-setup` will now ensure container definitions are
installed with `0600` permissions mode only.

`launcher` will now throw a warning when an existing container
definition is world-readable.

Also clean up leftover `launcher setup` logic which no longer exists.
Merge pre-existing logic into `check_prereqs` function.
2022-05-03 11:54:24 -04:00
Michael Brown e0da21275f FIX: the output from which confuses an integer comparison
Thanks @ldmosquera for identifying the problem and fix
2021-10-01 17:33:23 -04:00
Joel Uckelman f568633bf0 FIX: Use the return code from which correctly
The return code of which is the number of arguments which failed...
but what we actually want is 0 when at least one of the docker
exectutables is found and nonzero when none are found.
2021-08-06 17:49:22 -03:00
Joel Uckelman 994922639b
FIX: Don't print error message from which when checking docker install (#549)
'which docker.io || which docker' prints an error message when docker.io
is missing, which will be the case on any non-Ubuntu-based system. This
is confusing and not actually an error unless _both_ are missing.
2021-08-06 11:22:46 +10:00
Jay Pfaffman c5a47cd1e8
FIX: discourse-setup stop running container (#528)
This got commented out during testing of the previous commit
2021-02-23 08:52:20 +11:00
Jay Pfaffman cc5b00a49e feature: discourse-setup email config improvements 2021-02-22 16:27:38 -03:00
Jay Pfaffman 3063a97a2c FIX: discourse-setup MAXMIND works correctly
Ouch. This was worse than I thought.

Things fixed:

- consistent formatting (mostly that after `then` was indented by 4, not 2)
- fail if `DISCOURSE_MAXMIND_LICENSE_KEY` is not added to $web_file
- detect if `web_only.yml` exists 
- stop `web_only` if it exists rather than non-existing `app` (but why is it stopping it anyway?)
- don't try to `assert_maxmind_license_key` before `app.yml` exists
2021-02-04 15:53:47 -03:00
Jay Pfaffman 32c7b98716 use $web_file not app.yml
Maybe this will do the trick
2021-02-04 15:53:47 -03:00
Jay Pfaffman 5bc3e708aa FIX: discourse-setup was not adding MAXMIND key
Oops. The line that was supposed to add the MAXMIND line to app.yml was broken.
2021-02-04 15:53:47 -03:00
Jay Pfaffman 991162e778
Support maxmind (#512)
* add prompts for maxmind

* can leave key blank

* include message for removing key

* fix maxmind prompts

* cleanup assert_maxmind_license_key

* remove changes to check_port()

* remove trailing whitespace

* do not remove ip match check

* fix  indent for chech_IP_match

* remove all trailing whitespace
2021-01-22 17:24:46 -08:00
tshenry 3d34d98992
FEATURE: Add validation to admin email prompt in discourse-setup (#514) 2021-01-08 21:08:05 -08:00
Jay Pfaffman 3a4be87a78
UI: discourse-setup tweak dns problem message (#460)
Make the "your domain doesn't resolve" message more clear.
2020-05-11 19:10:24 -03:00
Rafael dos Santos Silva d3e3857ddc
Early hostname check (#456)
* Move hostname check to earlier in the process

* Provide instruction on hostname check failure

* Fix instruction in case of hostname failure
2020-02-19 16:27:34 -03:00
Rafael dos Santos Silva 026a664e77 FEATURE: Default to HTTPS 2019-12-02 17:34:15 -03:00
Todd Sharp 20e812e3d8 Change check for linux memory (#452)
* Change check for linux memory

Some VMs clock in at *just under* 1GB, so checking for 1GB of RAM will miss these.  Instead, check for MB, divide by 1000 and round up.

* Refine the check_linux_memory function

Be a little more precise and only make an exception for VMs with >= 990MB RAM
2019-10-28 12:58:56 +11:00
Ruben Homs b6379984c2 Make port check optional, add y/n prompt (#448) 2019-10-24 11:40:36 +11:00
Andrew Schleifer 72a7bdf04a fallocate swapfile instead of dd 2019-08-22 20:05:58 -03:00
Rafael dos Santos Silva 874fa4d375 Make our swap config compatible with systemd >= 207 (#331) 2018-11-27 18:39:46 +11:00
Rishabh b7298113d2 Improved Let's Encrypt email argument (#400) 2018-07-30 10:14:44 +10:00
Jay Pfaffman 04a06dd05e fix old awk, better error check, fix data.yml for 2container 2018-04-13 05:57:27 -07:00
Jay Pfaffman 275735af30 FIX discourse-setup--better sanity checking 2018-04-05 15:59:32 -07:00
Jeff Atwood 8e7862c4b4
Improve failed to create swap message 2018-01-03 00:01:42 -08:00
Jay Pfaffman f5cf127dd8 Update samples (#387)
* update web_only.yml to match app.yml

* update data.yml to match standalone.yml

* missing quotes around variable

* first attempt at multi install

* fix up start up

* change 2 container command line option to "2container"
2017-12-28 12:15:59 +11:00
Jay Pfaffman 23c730f0ae Update samples (#385)
* update web_only.yml to match app.yml

* update data.yml to match standalone.yml

* missing quotes around variable
2017-12-12 15:48:23 +11:00
Jay Pfaffman 7f2d626012 port checking tweaks 2017-10-13 16:13:13 -07:00
Jay Pfaffman 17f62d8742 fix syntax error. update let's encrypt language. make backups. 2017-06-05 14:57:28 -07:00
Allen Hancock 2391b7fcf8 update bash if/else statements (#342) 2017-03-27 13:21:22 +11:00
Jeff Atwood 1fad33d6e8 remove excess echos for default let's encrypt off 2017-03-26 16:22:23 -07:00
Jay Pfaffman 07f3b11ea6 Warn not to use let's encrypt if hostname doesn't resolve to IP 2017-03-08 14:54:21 -08:00
Jay Pfaffman f17af9519e allow re-run of discourse-setup; pull defaults from standalone.yml 2017-03-03 15:52:14 -08:00
Teemu Heikkilä 965686730d Fix physical core calculation 2016-10-28 21:37:46 +03:00
Simon Gareste e5ec8aa116 Fix core and memory numbers availability on Mac OS X 2016-10-11 11:27:16 +02:00
Simon Gareste 69dcbef505 Fix OS X not knowing the free bash command 2016-10-11 10:12:31 +02:00
Jay Pfaffman bd7e6e26dd EDIT: Fix up messages about memory and swap 2016-09-12 15:11:19 -07:00
Jay Pfaffman f7bb85e6f1 FIX: make swap when mem is <= (not <) 2GB 2016-09-12 15:07:34 -07:00
Jay Pfaffman c87c4b0a3d removed errant echo 2016-09-06 16:21:14 -07:00
Jay Pfaffman 7cf781fc0c Install Docker if it's missing 2016-09-06 22:17:05 +00:00
Jay Pfaffman 1860218967 install docker if it's missing 2016-09-06 21:18:28 +00:00
Jay Pfaffman c6374a12c6 Fix code that tests for RAM and Swap size
Works on DO .5, 1, 2, 4 GB
2016-09-06 20:36:04 +00:00
Matt Palmer 63b6095f1b Escape slashes from smtp_password
Makes sed a whole lot happier about life.
2016-07-26 10:15:08 +10:00