Initial commit
This commit is contained in:
commit
cfc77fc119
9 files changed
+62
No files matched your search
@@ -0,0 +1 @@
|
||||
NOTE: These are meant to be run pasted into the terminal so these will mainly be oneliners, the .sh files are for easy reading and storing
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
#Benjamyn Love 2017
|
||||
#renames the .htaccess.vipback to .htacces
|
||||
#
|
||||
|
||||
#find . -name ".htaccess.vipback" -printf %h\\n | while read a; do mv -v $a/.htaccess.vipback $a/.htaccess; done
|
||||
if [[ "$PWD" == "/home/"?* ]]; then find . -name ".htaccess.vipback" -printf %h\\n | while read a; do mv -v $a/.htaccess.vipback $a/.htaccess; done; else echo "Not in a users home directory"; fi
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
#Benjamyn Love 2017
|
||||
#finds and renames all .htaccess files to .htaccess.vipback (This name is to avoid clobbering client .htaccess backups)
|
||||
#run in users home directory not anywhere else
|
||||
|
||||
#TODO add the homedir check if [[ "$PWD" == *"home/"?* ]]; then; echo 1; else echo 0; fi
|
||||
|
||||
if [[ "$PWD" == "/home"?* ]];then find . -name ".htaccess" -exec mv -v {} {}.vipback \;;else echo "Not in users home directory";fi
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
#Benjamyn Love 2017
|
||||
#this script will setup a test environment to test the .htaccess scripts/commands on
|
||||
|
||||
#make directories to simulate client guff
|
||||
mkdir blog shop dev staging
|
||||
mkdir blog/images shop/products
|
||||
|
||||
#create the .htaccess files
|
||||
touch .htaccess blog/.htaccess blog/images/.htaccess shop/.htaccess shop/products/.htaccess dev/.htaccess staging/.htaccess
|
||||
Reference in new issue
Block a user