Permalink
Browse files

update

  • Loading branch information...
1 parent e492075 commit e90ef0b72991e9608f290be567f80bb7ec652993 @mxdpeep committed Apr 5, 2012
Showing with 91 additions and 137 deletions.
  1. +1 −0 .gitignore
  2. +4 −6 README.md
  3. +4 −7 backup-home.sh
  4. +4 −7 backup-root.sh
  5. +6 −7 backup-www.sh
  6. +3 −5 cert-delete.sh
  7. +3 −5 cert-import.sh
  8. +3 −5 cert-list.sh
  9. +3 −5 delete-chrome-profile.sh
  10. +3 −5 detoxify.sh
  11. +4 −8 fix-chrome-profile.sh
  12. +3 −5 flac2mp3.sh
  13. +3 −5 git-create.sh
  14. +3 −5 hibernate.sh
  15. +3 −5 pdf-check.sh
  16. +3 −5 pinglan.sh
  17. +5 −9 restore-home.sh
  18. +5 −11 restore-root.sh
  19. +4 −5 run-skype.sh
  20. +3 −4 ssl-create.sh
  21. +3 −4 suspend.sh
  22. +3 −5 svn-create.sh
  23. +15 −14 vhost-create.sh
View
@@ -0,0 +1 @@
+*.bak
View
@@ -2,7 +2,7 @@ Linux shell scripts collection
==============================
-Feel free to contact me with tips, additions or bug fixies at <git@mxd.cz>.
+Feel free to contact me with tips, additions or bug fixes at <git@mxd.cz>.
backup-home.sh
@@ -122,6 +122,7 @@ suspend.sh
Make your PC sleep.
ATTENTION WHEN CONNECTED REMOTELY!!!
+
svn-create.sh
-------------
@@ -132,16 +133,13 @@ EDIT SVN PATH VARIABLE BEFORE FIRST USE!!!
vhost-create.sh
---------------
-Setup 3 virtual hosts (production, beta and dev) and configuration files for a domain.
+Setup 3 virtual hosts (production, beta and dev) and Apache configuration files for a domain.
EDIT VARIABLES BEFORE FIRST USE!!!
-
+Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-Filip Oscadal <filip@mxd.cz> http://mxd.cz/
-No Rights Reserved 2012, feel free to modify, use and distribute.
-
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
View
@@ -1,23 +1,20 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/
-# No Rights Reserved 2012, feel free to modify, use and distribute.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
# OTHER KIND OF LOSS WHILE USING OR MISUSING THIS SOFTWARE.
# See the GNU General Public License for more details.
-# CHANGE THIS TO MATCH YOUR BACKUP MEDIA LOCATION!
+# CHANGE THIS VARIABLE TO MATCH YOUR BACKUP MEDIA LOCATION!
P='/media/backup'
-# run
if [ -d "$P" ]
then
cd ~
View
@@ -1,23 +1,20 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/
-# No Rights Reserved 2012, feel free to modify, use and distribute.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
# OTHER KIND OF LOSS WHILE USING OR MISUSING THIS SOFTWARE.
# See the GNU General Public License for more details.
-# CHANGE THIS TO MATCH YOUR BACKUP MEDIA LOCATION!
+# CHANGE THIS VARIABLE TO MATCH YOUR BACKUP MEDIA LOCATION!
P='/media/backup'
-# run
if [ -d "$P" ]
then
cd /
View
@@ -1,22 +1,21 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/
-# No Rights Reserved 2012, feel free to modify, use and distribute.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
# OTHER KIND OF LOSS WHILE USING OR MISUSING THIS SOFTWARE.
# See the GNU General Public License for more details.
-# CHANGE THIS TO MATCH YOUR BACKUP MEDIA LOCATION!
+# CHANGE THIS VARIABLE TO MATCH YOUR BACKUP MEDIA LOCATION!
P='/media/backup'
-# CHANGE THIS TO MATCH YOUR WEB MEDIA LOCATION!
+
+# CHANGE THIS PATH TO MATCH YOUR WEB MEDIA LOCATION!
cd ~/www
View
@@ -1,10 +1,8 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/
-# No Rights Reserved 2012, feel free to modify, use and distribute.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
View
@@ -1,10 +1,8 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/
-# No Rights Reserved 2012, feel free to modify, use and distribute.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
View
@@ -1,10 +1,8 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/
-# No Rights Reserved 2012, feel free to modify, use and distribute.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
@@ -1,10 +1,8 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/
-# No Rights Reserved 2012, feel free to modify, use and distribute.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
View
@@ -1,10 +1,8 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/
-# No Rights Reserved 2012, feel free to modify, use and distribute.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
View
@@ -1,22 +1,18 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/
-# No Rights Reserved 2012, feel free to modify, use and distribute.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
# OTHER KIND OF LOSS WHILE USING OR MISUSING THIS SOFTWARE.
# See the GNU General Public License for more details.
-# kill running Chrome
killall chrome
-
-# try to fix SQLite
file ~/.config/google-chrome/Default/* | grep SQLite | cut -d: -f1 |xargs -n1 -d '\n' sh -c 'sqlite3 "$0" .schema 2>&1 >/dev/null | grep -q "is locked" && {echo "fixing $0"; mv "$0" tmp.$$; cp tmp.$$ "$0"; rm tmp.$$;}'
+sync
echo -e "\nDone.\n"
exit 0
View
@@ -1,10 +1,8 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/
-# No Rights Reserved 2012, feel free to modify, use and distribute.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
View
@@ -1,10 +1,8 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/
-# No Rights Reserved 2012, feel free to modify, use and distribute.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
View
@@ -1,10 +1,8 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/
-# No Rights Reserved 2012, feel free to modify, use and distribute.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
View
@@ -1,10 +1,8 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/
-# No Rights Reserved 2012, feel free to modify, use and distribute.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
View
@@ -1,10 +1,8 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/
-# No Rights Reserved 2012, feel free to modify, use and distribute.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
View
@@ -1,9 +1,8 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/ * No Rights Reserved 2011.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
@@ -18,18 +17,15 @@ then
exit 1
fi
-# remove everything in your home except . and .., then restore home from backup
+# remove everything in your home except . and .. folders, then restore your home from the backup
if [ -f "$1" ]
then
cd ~
sudo rm -rf .[^.]*
sudo rm -rf ..*
-
sudo tar xvpzf $1
-
sync
-
- echo -e "\nRelog now!\n"
+ echo -e "\nPlease log out now!\n"
else
echo "Invalid file: $1"
exit 1
View
@@ -1,9 +1,8 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/ * No Rights Reserved 2011.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
@@ -23,17 +22,12 @@ if [ -f "$2" ]
then
sudo mount -t ext4 "/dev/$1" "/mnt/$1"
cd "/mnt/$1"
-
sudo rm -rf *
-
sudo tar xvpzf $2
-
sudo mkdir proc media lost+found sys mnt media dev
-
- sync
-
sudo umount "/mnt/$1"
- echo -e "\nReboot the machine now!\n"
+ sync
+ echo -e "\nPlease reboot the machine now!\n"
else
echo "Invalid file: $2"
exit 1
View
@@ -1,9 +1,8 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/ * No Rights Reserved 2011.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
@@ -19,7 +18,7 @@ then
exit 1
fi
-# run Skype incl. video
+# run Skype
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype
echo -e "\nDone.\n"
View
@@ -1,9 +1,8 @@
#!/bin/bash
-#
+
+# Filip Oščádal <filip@mxd.cz> - <http://mxd.cz/>.
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
-#
-# Filip Oscadal <filip@mxd.cz> http://mxd.cz/ * No Rights Reserved 2011.
-#
+
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
Oops, something went wrong.

0 comments on commit e90ef0b

Please sign in to comment.