u
This commit is contained in:
parent
2d38dc0b68
commit
e79356b310
@ -48,7 +48,9 @@ if [ "$DebianVersionMain" == '10' ]
|
||||
then
|
||||
chmod o+w /etc/sudoers
|
||||
## Debian 10 上,不存在 includedir,需要自己添加。而 Debian 11.1 上,已经存在 @includedir
|
||||
sed -i "s|#includedir /etc/sudoers.d|includedir /etc/sudoers.d|g" /etc/sudoers # allow users in /etc/sudoers.d/ folder to sudo
|
||||
echo >> /etc/sudoers
|
||||
echo includedir /etc/sudoers.d >> /etc/sudoers # allow users in /etc/sudoers.d/ folder to sudo
|
||||
echo >> /etc/sudoers
|
||||
chmod o-w /etc/sudoers
|
||||
fi
|
||||
echo
|
||||
|
@ -12,5 +12,6 @@ else
|
||||
fi
|
||||
|
||||
sudo usermod -aG docker $DOCKERUSER
|
||||
sudo newgrp docker
|
||||
sudo systemctl restart docker
|
||||
groups $DOCKERUSER
|
||||
newgrp docker # run as the docker group in the current shell
|
||||
|
@ -15,7 +15,7 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$(uname)" = "linux" ]]
|
||||
if [[ "$(uname)" = "Linux" ]]
|
||||
then
|
||||
# 用 dpkg --print-architecture 更直接
|
||||
ARCH=`dpkg --print-architecture`
|
||||
|
@ -14,7 +14,7 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$(uname)" = "linux" ]]
|
||||
if [[ "$(uname)" = "Linux" ]]
|
||||
then
|
||||
# 用 dpkg --print-architecture 更直接
|
||||
ARCH=`dpkg --print-architecture`
|
||||
|
@ -56,6 +56,7 @@ alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
alias su='su -'
|
||||
alias npmc='npm --registry https://registry.npm.taobao.org'
|
||||
if [[ "$(uname)" = "Darwin" ]];
|
||||
then
|
||||
alias l='ls -lG'
|
||||
|
@ -1,7 +1 @@
|
||||
registry=https://registry.npm.taobao.org
|
||||
|
||||
## npm config set registry https://registry.npm.taobao.org
|
||||
## npm config set registry https://registry.npmjs.org
|
||||
## npm config get registry
|
||||
## npm config ls -l
|
||||
## npm --registry registry https://registry.npm.taobao.org ...
|
@ -1,9 +0,0 @@
|
||||
if [ "$1" ]
|
||||
then
|
||||
PORT=$1
|
||||
else
|
||||
echo "=== 需要查看的端口号:"
|
||||
read -p ">>> " PORT
|
||||
fi
|
||||
|
||||
lsof -i tcp:$PORT
|
@ -6,4 +6,9 @@ else
|
||||
read -p ">>> " PORT
|
||||
fi
|
||||
|
||||
netstat -tunlp | grep $PORT
|
||||
if [[ "$(uname)" = "Darwin" ]]
|
||||
then
|
||||
lsof -i tcp:$PORT
|
||||
else
|
||||
netstat -tunlp | grep $PORT
|
||||
fi
|
@ -5,7 +5,7 @@ echo === Enter [s] to start, [t] to terminate or [anything else] for no change
|
||||
set /p TODOMODE=">>> "
|
||||
echo;
|
||||
if "s" == "%TODOMODE%" (
|
||||
set ALL_PROXY=socks5://127.0.0.1:1080
|
||||
set all_proxy=socks5://127.0.0.1:1080
|
||||
echo "--- 已开启网络代理"
|
||||
) else if "t" == "%TODOMODE%" (
|
||||
set all_proxy=
|
||||
|
8
proxy.sh
8
proxy.sh
@ -5,13 +5,13 @@ function proxy(){
|
||||
read -p ">>> " proxySwitch
|
||||
if [ $proxySwitch ] && [ $proxySwitch == "s" ]
|
||||
then
|
||||
export ALL_PROXY=socks5://127.0.0.1:1086
|
||||
export http_proxy=http://127.0.0.1:8090
|
||||
export https_proxy=https://127.0.0.1:8090
|
||||
export all_proxy=socks5://127.0.0.1:1086
|
||||
export http_proxy=socks5://127.0.0.1:1086
|
||||
export https_proxy=socks5://127.0.0.1:1086
|
||||
echo -e "--- 已开启网络代理"
|
||||
elif [ $proxySwitch ] && [ $proxySwitch == "t" ]
|
||||
then
|
||||
unset ALL_PROXY
|
||||
unset all_proxy
|
||||
unset http_proxy
|
||||
unset https_proxy
|
||||
echo -e "--- 已关闭网络代理"
|
||||
|
@ -29,7 +29,7 @@ sudo ./setup-seafile.sh # to setup seafile+sqlite (setup-seafile-mysql.sh is for
|
||||
sudo ./seafile.sh start
|
||||
|
||||
## changed "127.0.0.1:8000" to "0.0.0.0:8000", otherwise it can only be accessed on the localhost, unless using nginx/apache to proxy
|
||||
# sudo sed -i "s/127\.0\.0\.1/0.0.0.0/g" ../conf/gunicorn.conf.py
|
||||
# sudo sed -i "s|127.0.0.1|0.0.0.0|g" ../conf/gunicorn.conf.py
|
||||
## to change seahub port, to edit gunicorn.conf.py, it works although it still promts "Starting seahub at port 8000 ...".
|
||||
## (Directly `./seahub.sh start <PORT>` prompts "Starting seahub at port <PORT> ..." but it actually doesn't listen on <PORT>.)
|
||||
sudo ./seahub.sh start # the first run will asks to setup an admin account
|
||||
|
Loading…
Reference in New Issue
Block a user