You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ci/bundle_install.sh
+21-13Lines changed: 21 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ if [ "$EUID" -ne 0 ]; then
33
33
exit
34
34
fi
35
35
36
-
if! [[ -d /run/systemd/system ]];then
36
+
if[ !-d /run/systemd/system ];then
37
37
failWithError "Your system is not running systemd. As this installer relies on systemd services to run daemons, it's of no use on your system. You will have to install Smithereen manually."
38
38
fi
39
39
@@ -61,11 +61,13 @@ if ! [ -x "$(command -v mysql)" ]; then
61
61
If you would like to run the database on a separate server, you will have to install Smithereen manually."
62
62
fi
63
63
mysqlVersion="$(mysql --version | tr -s " ")"
64
-
if [ "$(echo $mysqlVersion | grep MariaDB | wc -l)" -gt "0" ]; then
64
+
echo $mysqlVersion | grep -q MariaDB
65
+
if [ "$?" ]; then
65
66
failWithError "You have MariaDB instead of MySQL. Unfortunately, some distribution maintainers think that it's a drop-in replacement, but MariaDB is known to be incompatible with Smithereen.
66
67
See $mysqlHelpUrl for instructions on how to install MySQL, or, if you need MariaDB for other applications on your server, consider running Smithereen in a container like Docker or LXC."
67
68
fi
68
-
if [ "$(echo $mysqlVersion | grep Distrib | wc -l)" -gt "0" ]; then
read -p "Database name and new MySQL user name [smithereen]: " dbName
109
111
if [ -z "$dbName" ]; then dbName="smithereen"; fi
110
112
read -p "Would you like to use an S3 cloud storage service for user-uploaded files (y/n)? [n]: " useS3
111
-
if [ "$useS3" == [yY] ]; then
113
+
echo "$useS3" | grep -q '[yY]'
114
+
if [ "$?" ]; then
112
115
echo ""
113
116
echo "Make sure you've read the readme and configured your storage service correctly: https://github.com/grishka/Smithereen/blob/master/README.md#using-s3-object-storage"
114
117
echo ""
@@ -140,13 +143,13 @@ read -p "Press Enter to continue..."
140
143
echo ""
141
144
mkdir -p $installLocation || failWithError "Unable to create directory $installLocation"
142
145
mkdir -p $installLocation/nginx_cache/images
143
-
mkdir -p $webRoot
146
+
mkdir -p $webRoot || failWithError "Unable to create directory $webRoot"
0 commit comments