This commit is contained in:
陆柯 2019-12-18 16:53:04 +08:00
parent 350906875c
commit 67715ec2e2
8 changed files with 15 additions and 11 deletions

View File

@ -4,7 +4,7 @@ if [ $1 ]
then
REMOTEHOST=$1
else
read -p "Enter user@remotehost " REMOTEHOST
read -p "Enter user@remotehost >> " REMOTEHOST
fi
scp ~/.ssh/id_rsa.pub $REMOTEHOST:~/tmp.pub

View File

@ -5,7 +5,7 @@ if [ v$1 != v ]
then
NewUser=$1
else
read -p "Enter new user name: " NewUser
read -p "Enter new user name >> " NewUser
fi
echo "<<< Add a new user $NewUser"

View File

@ -1,14 +1,13 @@
#!/bin/bash
echo "Usage: setup.sh [Source-Path-To-Config-Files]"
echo " (default to /faronear/lib/sysconfig)"
echo "---------------------------------------------"
if [ $1 ]
then
SourcePath=$1
else
read -p "Enter config source path : " SourcePath
read -p "Enter config source path (leave blank for /faronear/lib/sysconfig) >> " SourcePath
if [ ! $SourcePath ]
then
echo Use default source path: /faronear/lib/sysconfig

View File

@ -4,7 +4,12 @@ if [ $1 ]
then
FONPATH=$1
else
read -p "Enter path-to-faronear " FONPATH
read -p "Enter path-to-faronear >> " FONPATH
if [ ! $FONPATH ]
then
echo Use default path: /faronear
SourcePath=/faronear
fi
fi
pushd $FONPATH

View File

@ -5,6 +5,6 @@ git clone https://github.com/teddysun/lamp.git
cd lamp
chmod 755 *.sh
read -p "Enter root password of MySQL Server: " DBPWD
read -p "Enter root password of MySQL Server >> " DBPWD
./lamp.sh --apache_option 1 --db_option 3 --php_option 4 --db_manage_modules --db_root_pwd $DBPWD phpmyadmin --kodexplorer_option 1

View File

@ -7,7 +7,7 @@ if [ v$1 != v ]
then
mongoVersion=$1
else
read -p "Enter mongo version (leave blank for default 4.2) : " mongoVersion
read -p "Enter mongo version (leave blank for default 4.2) >> " mongoVersion
if [ ! $mongoVersion ]
then
echo Use default mongo version 4.2

View File

@ -1,13 +1,13 @@
#!/bin/bash
echo "Usage: setup.sh [VERSION(default to 10)]"
echo "Usage: setup.sh [nodeVersion]"
echo "Example: setup.sh 12"
if [ v$1 != v ]
then
nodeVersion=$1
else
read -p "Enter node version : " nodeVersion
read -p "Enter node version (leave blank for default 10) >> " nodeVersion
if [ ! $nodeVersion ]
then
echo Use default node version 10

View File

@ -2,14 +2,14 @@ if [ $1 ]
then
LOCALPATH=$1
else
read -p "Enter localpath " LOCALPATH
read -p "Enter localpath >> " LOCALPATH
fi
if [ $2 ]
then
REMOTEPATH=$2
else
read -p "Enter user@remotehost:path " REMOTEPATH
read -p "Enter user@remotehost:path >> " REMOTEPATH
fi
echo rsync -rvz -e ssh -p 22000 --progress $LOCALPATH $REMOTEHOST