diff --git a/README.md b/README.md index 7539439..2c7b6d4 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,18 @@ * 禁止 root 用户远程登录,另建 adot (admin+root) 用户用于远程登录。 * 软件、配置安装在 /faronear 目录下,尽量保持与 git 仓库的路径一致,例如 /faronear/tic/wallet/dist/ * /faronear 允许 adot 访问,但必须把其中机密文件的权限设置到最小。 -* 用 adot 账号远程登录后,su 后启动软件。 \ No newline at end of file +* 用 adot 账号远程登录后,su 后启动软件。 + +-e 判断对象是否存在 +-d 判断对象是否存在,并且为目录 +-f 判断对象是否存在,并且为常规文件 +-L 判断对象是否存在,并且为符号链接 +-h 判断对象是否存在,并且为软链接 +-s 判断对象是否存在,并且长度不为0 +-r 判断对象是否存在,并且可读 +-w 判断对象是否存在,并且可写 +-x 判断对象是否存在,并且可执行 +-O 判断对象是否存在,并且属于当前用户 +-G 判断对象是否存在,并且属于当前用户组 +-nt 判断file1是否比file2新 [ "/data/file1" -nt "/data/file2" ] +-ot 判断file1是否比file2旧 [ "/data/file1" -ot "/data/file2" ] \ No newline at end of file diff --git a/setup-debian.sh b/setup-debian.sh index 4686e5d..b757977 100644 --- a/setup-debian.sh +++ b/setup-debian.sh @@ -16,16 +16,19 @@ if [ ! -d "/faronear" ] then mkdir /faronear fi + echo "<<< Making dir /faronear/lib" if [ ! -d "/faronear/lib" ] then mkdir /faronear/lib fi + echo "<<< Git cloning to /faronear/lib/sysconfig" if [ ! -d "/faronear/lib/sysconfig" ] then git clone https://git.faronear.org/lib/sysconfig /faronear/lib/sysconfig fi + echo "<<< Configure home" if [ ! -f "~/.bashrc.backup" ] then @@ -72,7 +75,7 @@ chmod +x /faronear/autostart.sh echo '>>> Autostart is set. You can "systemctl start/stop/status rc-local" to manage it.' echo "<<< Configure locales: install all-locales, default to zh-CN.UTF-8" -sudo dpkg-reconfigure locales +dpkg-reconfigure locales echo "<<< Debian System Setup Completed >>>"