Aligned to project rename

This commit is contained in:
Pratik
2019-01-29 12:40:15 +05:30
parent 292fd6daf9
commit edcfae7fe8
2 changed files with 11 additions and 10 deletions

View File

@@ -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__*. 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
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. > 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.

View File

@@ -1,7 +1,8 @@
#!/etc/bin/env bash #!/etc/bin/env bash
SCRIPT_NAME=server_harden SCRIPT_NAME=server_init_harden
SCRIPT_VERSION=0.2 SCRIPT_VERSION=0.5
LOGFILE=/tmp/"$SCRIPT_NAME"_v"$SCRIPT_VERSION".log LOGFILE=/tmp/"$SCRIPT_NAME"_v"$SCRIPT_VERSION".log
# Reset previous log file # Reset previous log file
TS=$(date '+%d_%m_%Y-%H_%M_%S') TS=$(date '+%d_%m_%Y-%H_%M_%S')
@@ -19,9 +20,9 @@ CGREEN="${CSI}1;32m"
# Usage # Usage
############################################################## ##############################################################
# Script takes arguments as follows # Script takes arguments as follows
# init-linux-harden -username pratik --resetrootpwd # server_init_harden -username pratik --resetrootpwd
# init-linux-harden -u pratik --resetrootpwd # server_init_harden -u pratik --resetrootpwd
# init-linux-harden -username pratik --resetrootpwd -q # server_init_harden -username pratik --resetrootpwd -q
function usage() { function usage() {
if [ -n "$1" ]; then if [ -n "$1" ]; then
@@ -193,7 +194,7 @@ else
printf "%3s Username you opted = %s\\n" " -" "$NORM_USER_NAME" | tee -a "$LOGFILE" printf "%3s Username you opted = %s\\n" " -" "$NORM_USER_NAME" | tee -a "$LOGFILE"
fi fi
if [[ "$DEFAULT_SOURCE_LIST" == "y" ]]; then 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 fi
if [[ "$RESET_ROOT_PWD" == "y" ]]; then if [[ "$RESET_ROOT_PWD" == "y" ]]; then
printf "%3s Reset root password\\n" " -" | tee -a "$LOGFILE" printf "%3s Reset root password\\n" " -" | tee -a "$LOGFILE"