projects
/
discourse_docker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7802f67
)
add root check since it's required
author
Jeff Atwood
<jatwood@codinghorror.com>
Tue, 10 May 2016 22:20:39 +0000
(15:20 -0700)
committer
Jeff Atwood
<jatwood@codinghorror.com>
Tue, 10 May 2016 22:20:39 +0000
(15:20 -0700)
discourse-setup
patch
|
blob
|
blame
|
history
diff --git
a/discourse-setup
b/discourse-setup
index 268fa0365e8789a0ed6bbd88e441ae130895f2cc..d05d3fb137c16aa545c336f61a208a8747cc4f88 100755
(executable)
--- a/
discourse-setup
+++ b/
discourse-setup
@@
-1,5
+1,15
@@
#!/bin/bash
+##
+## Make sure only root can run our script
+##
+check_root() {
+ if [[ $EUID -ne 0 ]]; then
+ echo "This script must be run as root. Please sudo or log in as root first." 1>&2
+ exit 1
+ fi
+}
+
##
## Do we have enough memory and disk space for Discourse?
##
@@
-389,6
+399,7
@@
changelog=/tmp/changelog
##
## Check requirements before creating a copy of a config file we won't edit
##
+check_root
check_disk_and_memory
check_ports