From 0efea0431ee3033691f87fc74a46718aa1698afd Mon Sep 17 00:00:00 2001 From: Cold-Egg Date: Thu, 20 Aug 2020 15:25:43 +0800 Subject: [PATCH] nobody ssh --- README.md | 16 +++++++++------- lsws1clk.sh | 9 +++++++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1a1a423..0ce078d 100644 --- a/README.md +++ b/README.md @@ -7,30 +7,32 @@ Description lsws1clk is a one-click installation script for LiteSpeed Web Server. Using this script, you can quickly and easily install: -1. LSWS + PHP + MariaDB + WordPress + LiteSpeed Cache + Object Cache -2. LSWS + PHP + MariaDB + Magento2 + LiteMage +| LSWS+PHP+DB|Application|Cache Plugin| +| :-------------: | :-------------: | :-------------: | +| V |WordPress | V| +| V |Magento2 | V | +|V|OpenCart|| +|V|PrestaShop|| The script come with trial license by default which has 15 days for free. After that, you may want to apply with your license. License start from $0. [Read More](https://www.litespeedtech.com/products/litespeed-web-server/lsws-pricing) # How to use --------- +This script is design for one application quick install and testing porpuse. ## Install Pre-Requisites For CentOS/RHEL Based Systems ```bash -yum install git -y +yum install git -y; git clone https://github.com/Code-Egg/lsws1clk.git ``` For Debian/Ubuntu Based Systems ```bash -apt install git -y +apt install git -y; git clone https://github.com/Code-Egg/lsws1clk.git ``` ## Install -``` bash -git clone https://github.com/Code-Egg/lsws1clk.git -``` ### WordPress ``` bash lsws1clk/lsws1clk.sh -W diff --git a/lsws1clk.sh b/lsws1clk.sh index 8ae06c4..42797c2 100755 --- a/lsws1clk.sh +++ b/lsws1clk.sh @@ -830,8 +830,13 @@ set_mariadb_user(){ } www_user_pass(){ - LINENUM=$(grep -n -m1 www-data /etc/passwd | awk -F ':' '{print $1}') - sed -i "${LINENUM}s|/usr/sbin/nologin|/bin/bash|" /etc/passwd + if [ "${OSNAME}" = "centos" ]; then + LINENUM=$(grep -n -m1 nobody /etc/passwd | awk -F ':' '{print $1}') + sed -i "${LINENUM}s|sbin/nologin|/bin/bash|" /etc/passwd + elif [ "${OSNAME}" = 'ubuntu' ] || [ "${OSNAME}" = 'debian' ]; then + LINENUM=$(grep -n -m1 www-data /etc/passwd | awk -F ':' '{print $1}') + sed -i "${LINENUM}s|/usr/sbin/nologin|/bin/bash|" /etc/passwd + fi } install_WP_CLI(){