mirror of
https://gitlab.com/mlunax/dotfiles.git
synced 2025-04-16 07:26:51 +00:00
new scripts
This commit is contained in:
parent
918cffedce
commit
e15e7ae6d7
2 changed files with 22 additions and 0 deletions
13
bin/hosts.sh
Executable file
13
bin/hosts.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
#bash hosts.sh domain.pl serwer.lh.pl
|
||||
if [ $# -eq 2 ]; then
|
||||
DOMAIN=$1
|
||||
SERWER=$2
|
||||
else
|
||||
echo "DOMAIN:"
|
||||
read DOMAIN
|
||||
echo "SERWER:"
|
||||
read SERWER
|
||||
fi
|
||||
IP=`dig +short A $SERWER | tr -d '\n'`
|
||||
echo "$IP $DOMAIN www.$DOMAIN" | tee -a /etc/hosts
|
9
bin/mysql_upload.sh
Executable file
9
bin/mysql_upload.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
if [ $# -le 2 ]; then
|
||||
echo $0 "db&user_name" "serwer_address" "sql_dump_path"
|
||||
exit
|
||||
fi
|
||||
name=$1
|
||||
filename=$3
|
||||
serwer=$2
|
||||
mysql -h $serwer -u $name $name -vp < $filename
|
Loading…
Add table
Reference in a new issue