Aligned to project rename
This commit is contained in:
@@ -30,11 +30,11 @@ Alpha testing. NOT production ready.
|
||||
The script is intended to be executed immediately after you have access to a *__new__* Linux server (most likely a VPS) as *__root__*.
|
||||
|
||||
```bash
|
||||
bash <(wget -q https://raw.githubusercontent.com/pratiktri/init-li-harden/master/init-linux-harden.sh -O -) --help
|
||||
bash <(wget -q https://raw.githubusercontent.com/pratiktri/server_init_harden/master/init-linux-harden.sh -O -) --help
|
||||
|
||||
bash <(wget -q https://raw.githubusercontent.com/pratiktri/init-li-harden/master/init-linux-harden.sh -O -) --username someusername --resetrootpwd --defaultsourcelist
|
||||
bash <(wget -q https://raw.githubusercontent.com/pratiktri/server_init_harden/master/init-linux-harden.sh -O -) --username someusername --resetrootpwd --defaultsourcelist
|
||||
|
||||
bash <(wget -q https://raw.githubusercontent.com/pratiktri/init-li-harden/master/init-linux-harden.sh -O -) --quiet
|
||||
bash <(wget -q https://raw.githubusercontent.com/pratiktri/server_init_harden/master/init-linux-harden.sh -O -) --quiet
|
||||
```
|
||||
|
||||
> There are inherent risks involved with running scripts directly (without reviewing it first) from web - as done above. Everyone does it anyways, but you have been warned.
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/etc/bin/env bash
|
||||
|
||||
SCRIPT_NAME=server_harden
|
||||
SCRIPT_VERSION=0.2
|
||||
SCRIPT_NAME=server_init_harden
|
||||
SCRIPT_VERSION=0.5
|
||||
|
||||
LOGFILE=/tmp/"$SCRIPT_NAME"_v"$SCRIPT_VERSION".log
|
||||
# Reset previous log file
|
||||
TS=$(date '+%d_%m_%Y-%H_%M_%S')
|
||||
@@ -19,9 +20,9 @@ CGREEN="${CSI}1;32m"
|
||||
# Usage
|
||||
##############################################################
|
||||
# Script takes arguments as follows
|
||||
# init-linux-harden -username pratik --resetrootpwd
|
||||
# init-linux-harden -u pratik --resetrootpwd
|
||||
# init-linux-harden -username pratik --resetrootpwd -q
|
||||
# server_init_harden -username pratik --resetrootpwd
|
||||
# server_init_harden -u pratik --resetrootpwd
|
||||
# server_init_harden -username pratik --resetrootpwd -q
|
||||
|
||||
function usage() {
|
||||
if [ -n "$1" ]; then
|
||||
@@ -193,7 +194,7 @@ else
|
||||
printf "%3s Username you opted = %s\\n" " -" "$NORM_USER_NAME" | tee -a "$LOGFILE"
|
||||
fi
|
||||
if [[ "$DEFAULT_SOURCE_LIST" == "y" ]]; then
|
||||
printf "%3s Use debian.org in /etc/apt/source.list file\\n" " -" | tee -a "$LOGFILE"
|
||||
printf "%3s Reset the url for apt repo from VPS provided CDN to OS provided ones\\n" " -" | tee -a "$LOGFILE"
|
||||
fi
|
||||
if [[ "$RESET_ROOT_PWD" == "y" ]]; then
|
||||
printf "%3s Reset root password\\n" " -" | tee -a "$LOGFILE"
|
||||
|
||||
Reference in New Issue
Block a user