diff --git a/acme-setup-ssl.sh b/acme-setup-ssl.sh new file mode 100644 index 0000000..304c33c --- /dev/null +++ b/acme-setup-ssl.sh @@ -0,0 +1,103 @@ +while [ ! "$TARGET_HOSTNAME" ] +do + echo "=== DNS name such as www.example.com: " + read -p ">>> " TARGET_HOSTNAME +done +echo "*** -d $TARGET_HOSTNAME" +echo + +while [ ! "$ISSUEMODE" ] +do + echo "=== Issue mode:" + echo " for standalone" + echo " for webroot" + echo " for nginx" + echo " for apache" + echo " for challenge-alias" + echo " for dnsapi" + read -p ">>> " ISSUEMODE + if [ "$ISSUEMODE" == 's' ] + then + ISSUEPARM="--standalone" + elif [ "$ISSUEMODE" == 'w' ] + then + ISSUEPARM="-w" + elif [ "$ISSUEMODE" == 'n' ] + then + ISSUEPARAM="--nginx" + elif [ "$ISSUEMODE" == 'a' ] + then + ISSUEPARM="--apache" + elif [ "$ISSUEMODE" == 'c' ] + then + ISSUEPARM="--challenge-alias" + elif [ "$ISSUEMODE" == 'd' ] + then + ISSUEPARM="--dns" + else + ISSUEMODE='' + fi +done +echo "*** $ISSUEPARM" +echo + +if [ "$ISSUEMODE" == 'd' ] +then + while [ ! "$DNSAPI" ] + do + echo "=== DNS API provider, for CloudFlare, for DNSPod/腾讯云, for Aliyun/阿里云:" + read -p ">>> " DNSAPI_PROVIDER + if [ "$DNSAPI_PROVIDER" == 'cf' ] + then + DNSAPI='dns_cf' + elif [ "$DNSAPI_PROVIDER" == 'dp' ] + then + DNSAPI='dns_dp' + elif [ "$DNSAPI_PROVIDER" == 'ali '] + then + DNSAPI='dns_ali' + else + DNSAPI='' + fi + done + echo "*** $DNSAPI" + echo +fi + +# if [ "$ISSUEMODE" == 'c' ] +# then +# echo " === DNS API provider, for instance yuanjin.cc" +# read -p " >>> " CHALLENGE_ALIAS +# fi + +echo "*** Issue Certificate:" +echo "*** ~/.acme.sh/acme.sh --issue -d $TARGET_HOSTNAME $ISSUEPARM $DNSAPI" +echo "***" +#~/.acme.sh/acme.sh --issue -d $TARGET_HOSTNAME $ISSUEPARM $DNSAPI +echo + +echo "=== Install certificates? for no, to install: " +read -p ">>> " INSTALL_CERT +if [ "$INSTALL_CERT" != 'n' ] +then + echo + echo "=== Deploy key file to: " + read -p ">>> " KEY_FILE_PATH + echo + echo "=== Deploy fullchain file to: " + read -p ">>> " FULLCHAIN_FILE_PATH + echo + echo "=== Set reload command, for default to 'service nginx force-reload'" + read -p ">>> " RELOADCMD + if [ ! "$RELOADCMD" ] + then + RELOADCMD="service nginx force-reload" + fi + echo +fi + +echo "*** Install Certificate:" +echo "~/.acme.sh/acme.sh --install-cert -d $TARGET_HOSTNAME --key-file $KEY_FILE_PATH --fullchain-file $FULLCHAIN_FILE_PATH --reloadcmd \"$RELOADCMD\"" +echo "***" +~/.acme.sh/acme.sh --install-cert -d $TARGET_HOSTNAME --key-file $KEY_FILE_PATH --fullchain-file $FULLCHAIN_FILE_PATH --reloadcmd "$RELOADCMD" +echo \ No newline at end of file diff --git a/git-clone-all.sh b/git-clone-all.sh index b0a9245..f2aba71 100755 --- a/git-clone-all.sh +++ b/git-clone-all.sh @@ -1,105 +1,104 @@ #!/bin/bash -git clone https://git.faronear.org/fon/dot.vscode .vscode - -mkdir cup -pushd cup -git clone https://git.faronear.org/cup/cmc-user-uniapp cmc-user-uniapp.git -git clone https://git.faronear.org/cup/cmc-server-torm cmc-server-torm.git +mkdir cup.git +pushd cup.git +git clone https://git.faronear.org/cup/cmc-user-uniapp +git clone https://git.faronear.org/cup/cmc-server-torm popd -mkdir fon -pushd fon -git clone https://git.faronear.org/fon/sysconfig sysconfig.git -git clone https://git.faronear.org/fon/www.faronear.com www.faronear.com.git -git clone https://git.faronear.org/fon/yapi.faronear.org yapi.faronear.org.git -git clone https://git.faronear.org/fon/git.faronear.org git.faronear.org.git -git clone https://git.faronear.org/fon/www.faronear.org www.faronear.org.git -git clone https://git.faronear.org/fon/mail.faronear.org mail.faronear.org.git +mkdir fon.git +pushd fon.git +git clone https://git.faronear.org/fon/sysconfig +git clone https://git.faronear.org/fon/dot.vscode +git clone https://git.faronear.org/fon/www.faronear.com +git clone https://git.faronear.org/fon/yapi.faronear.org +git clone https://git.faronear.org/fon/git.faronear.org +git clone https://git.faronear.org/fon/www.faronear.org +git clone https://git.faronear.org/fon/mail.faronear.org popd -mkdir npm -pushd npm -git clone https://git.faronear.org/npm/wo-base-fileloader wo-base-fileloader.git -git clone https://git.faronear.org/npm/wo-base-deployer wo-base-deployer.git -git clone https://git.faronear.org/npm/wo-base-envar wo-base-envar.git -git clone https://git.faronear.org/npm/wo-base-cocon wo-base-cocon.git -git clone https://git.faronear.org/npm/wo-base-messenger wo-base-messenger.git -git clone https://git.faronear.org/npm/wo-base-netinfo wo-base-netinfo.git -git clone https://git.faronear.org/npm/wo-base-webserver wo-base-webserver.git -git clone https://git.faronear.org/npm/wo-base-websocket-server wo-base-websocket-server.git -git clone https://git.faronear.org/npm/wo-base-webtoken wo-base-webtoken.git +mkdir npm.git +pushd npm.git +git clone https://git.faronear.org/npm/wo-base-fileloader +git clone https://git.faronear.org/npm/wo-base-deployer +git clone https://git.faronear.org/npm/wo-base-envar +git clone https://git.faronear.org/npm/wo-base-cocon +git clone https://git.faronear.org/npm/wo-base-messenger +git clone https://git.faronear.org/npm/wo-base-netinfo +git clone https://git.faronear.org/npm/wo-base-webserver +git clone https://git.faronear.org/npm/wo-base-websocket-server +git clone https://git.faronear.org/npm/wo-base-webtoken -git clone https://git.faronear.org/npm/wo-core-i18n wo-core-i18n.git -git clone https://git.faronear.org/npm/wo-core-toolkit wo-core-toolkit.git -git clone https://git.faronear.org/npm/wo-core-rpcsocket wo-core-rpcsocket.git +git clone https://git.faronear.org/npm/wo-core-i18n +git clone https://git.faronear.org/npm/wo-core-toolkit +git clone https://git.faronear.org/npm/wo-core-rpcsocket -git clone https://git.faronear.org/npm/wo-user-part-uniapp wo-user-part-uniapp.git -git clone https://git.faronear.org/npm/wo-user-style-scss wo-user-style-scss.git -git clone https://git.faronear.org/npm/wo-user-toolkit-uniapp wo-user-toolkit-uniapp.git -git clone https://git.faronear.org/npm/wo-user-websocket-uniapp wo-user-websocket-uniapp.git +git clone https://git.faronear.org/npm/wo-user-part-uniapp +git clone https://git.faronear.org/npm/wo-user-style-scss +git clone https://git.faronear.org/npm/wo-user-toolkit-uniapp +git clone https://git.faronear.org/npm/wo-user-websocket-uniapp -git clone https://git.faronear.org/npm/tic-crypto tic-crypto.git -git clone https://git.faronear.org/npm/tic-chaintool tic-chaintool.git -git clone https://git.faronear.org/npm/tic-traction tic-traction.git +git clone https://git.faronear.org/npm/tic-crypto +git clone https://git.faronear.org/npm/tic-chaintool +git clone https://git.faronear.org/npm/tic-traction popd -mkdir sol -pushd sol -git clone https://git.faronear.org/sol/sol-ling sol-ling.git -git clone https://git.faronear.org/sol/sol-data sol-data.git -git clone https://git.faronear.org/sol/sol-base sol-base.git -git clone https://git.faronear.org/sol/solet solet.git -git clone https://git.faronear.org/sol/soweb soweb.git +mkdir sol.git +pushd sol.git +git clone https://git.faronear.org/sol/sol-ling +git clone https://git.faronear.org/sol/sol-data +git clone https://git.faronear.org/sol/sol-base +git clone https://git.faronear.org/sol/solet +git clone https://git.faronear.org/sol/soweb popd -mkdir tic -pushd tic -git clone https://git.faronear.org/tic/cloud-server cloud-server.git -git clone https://git.faronear.org/tic/cloud-user-vue cloud-user-vue.git -git clone https://git.faronear.org/tic/star-core-torm star-core-torm.git -git clone https://git.faronear.org/tic/star-lens-uniapp star-lens-uniapp.git -git clone https://git.faronear.org/tic/star-lens-vue star-lens-vue.git -git clone https://git.faronear.org/tic/tic-blog-hexo tic-blog-hexo.git -git clone https://git.faronear.org/tic/tic-www-vue tic-www-vue.git +mkdir tic.git +pushd tic.git +git clone https://git.faronear.org/tic/cloud-server +git clone https://git.faronear.org/tic/cloud-user-vue +git clone https://git.faronear.org/tic/star-core-torm +git clone https://git.faronear.org/tic/star-lens-uniapp +git clone https://git.faronear.org/tic/star-lens-vue +git clone https://git.faronear.org/tic/tic-blog-hexo +git clone https://git.faronear.org/tic/tic-www-vue -git clone https://git.faronear.org/tex/tex-basebank-java tex-basebank-java.git -git clone https://git.faronear.org/tex/tex-baserver-java tex-baserver-java.git -git clone https://git.faronear.org/tex/tex-team-vue tex-team-vue.git -git clone https://git.faronear.org/tex/tex-user-android tex-user-android.git -git clone https://git.faronear.org/tex/tex-user-ios tex-user-ios.git -git clone https://git.faronear.org/tex/tex-user-vue tex-user-vue.git +git clone https://git.faronear.org/tex/tex-basebank-java +git clone https://git.faronear.org/tex/tex-baserver-java +git clone https://git.faronear.org/tex/tex-team-vue +git clone https://git.faronear.org/tex/tex-user-android +git clone https://git.faronear.org/tex/tex-user-ios +git clone https://git.faronear.org/tex/tex-user-vue popd -mkdir tuc -pushd tuc +mkdir tuc.git +pushd tuc.git -git clone https://git.faronear.org/tuc/fork-tisch fork/tisch.git -git clone https://git.faronear.org/tuc/fork-nesh fork/nesh.git -git clone https://git.faronear.org/tuc/fork-nbtc fork/nbtc.git +git clone https://git.faronear.org/tuc/fork-tisch +git clone https://git.faronear.org/tuc/fork-nesh +git clone https://git.faronear.org/tuc/fork-nbtc -git clone https://git.faronear.org/tuc-pex/pex-blog-hexo pex/pex-blog-hexo.git -git clone https://git.faronear.org/tuc-pex/pex-chain-geth pex/pex-chain-geth.git -git clone https://git.faronear.org/tuc-pex/pex-contract-hardhat pex/pex-contract-hardhat.git -git clone https://git.faronear.org/tuc-pex/pex-server-torm pex/pex-server-torm.git -git clone https://git.faronear.org/tuc-pex/pex-scan-html pex/pex-scan-html.git -git clone https://git.faronear.org/tuc-pex/pex-user-uniapp pex/pex-user-uniapp.git +git clone https://git.faronear.org/tuc-pex/pex-blog-hexo +git clone https://git.faronear.org/tuc-pex/pex-chain-geth +git clone https://git.faronear.org/tuc-pex/pex-contract-hardhat +git clone https://git.faronear.org/tuc-pex/pex-server-torm +git clone https://git.faronear.org/tuc-pex/pex-scan-html +git clone https://git.faronear.org/tuc-pex/pex-user-uniapp -git clone https://git.faronear.org/tuc-log/log-team-uniapp log/log-team-uniapp.git -git clone https://git.faronear.org/tuc-log/log-server-mongo log/log-server-mongo.git -git clone https://git.faronear.org/tuc-log/log-server-torm log/log-server-torm.git -git clone https://git.faronear.org/tuc-log/log-user-uniapp log/log-user-uniapp.git -git clone https://git.faronear.org/tuc-log/log-blog-hexo log/log-blog-hexo.git +git clone https://git.faronear.org/tuc-log/log-team-uniapp +git clone https://git.faronear.org/tuc-log/log-server-mongo +git clone https://git.faronear.org/tuc-log/log-server-torm +git clone https://git.faronear.org/tuc-log/log-user-uniapp +git clone https://git.faronear.org/tuc-log/log-blog-hexo -git clone https://git.faronear.org/tuc-vic/vic.server.mongo vic/vic.server.mongo.git -git clone https://git.faronear.org/tuc-vic/vic.user.react vic/vic.user.react.git -git clone https://git.faronear.org/tuc-vic/vic.webhome.hexo vic/vic.webhome.hexo.git -git clone https://git.faronear.org/tuc-vic/vic.market vic/vic.market.git -git clone https://git.faronear.org/tuc-vic/vic.admin.vue vic/vic.admin.vue.git +git clone https://git.faronear.org/tuc-vic/vic.server.mongo +git clone https://git.faronear.org/tuc-vic/vic.user.react +git clone https://git.faronear.org/tuc-vic/vic.webhome.hexo +git clone https://git.faronear.org/tuc-vic/vic.market +git clone https://git.faronear.org/tuc-vic/vic.admin.vue -git clone https://git.faronear.org/tuc-fiv/fiv.webhome.hexo fiv.webhome.hexo.git -git clone https://git.faronear.org/tuc-fiv/fiv.server.mongo fiv.server.mongo.git -git clone https://git.faronear.org/tuc-fiv/fiv.user.react fiv.user.react.git +git clone https://git.faronear.org/tuc-fiv/fiv.webhome.hexo +git clone https://git.faronear.org/tuc-fiv/fiv.server.mongo +git clone https://git.faronear.org/tuc-fiv/fiv.user.react popd diff --git a/home-config.sh b/home-config.sh index 296c965..17d7a6b 100755 --- a/home-config.sh +++ b/home-config.sh @@ -2,7 +2,7 @@ testpath1=/faronear/fon/sysconfig/nixhome testpath2=~/faronear/fon/sysconfig/nixhome -testpath3=~/faronear/fon/sysconfig.git/nixhome +testpath3=~/faronear/fon.git/sysconfig/nixhome testpath4=`pwd`/nixhome if [ "$1" ] diff --git a/nixhome/.bashrc b/nixhome/.bashrc index b304a4d..08c9694 100644 --- a/nixhome/.bashrc +++ b/nixhome/.bashrc @@ -107,11 +107,11 @@ export USERPROFILE=$HOME # add sysconfig to path tp1=/Users/luk.lu/faronear/fon/sysconfig -tp2=/Users/luk.lu/faronear/fon/sysconfig.git +tp2=/Users/luk.lu/faronear/fon.git/sysconfig tp3=/faronear/fon/sysconfig -tp4=/faronear/fon/sysconfig.git -tp5=/mnt/c/faronear/fon/sysconfig.git -tp6=/mnt/d/faronear/fon/sysconfig.git +tp4=/faronear/fon.git/sysconfig +tp5=/mnt/c/faronear/fon.git/sysconfig +tp6=/mnt/d/faronear/fon.git/sysconfig if [ -d $tp1 ] then export PATH=$tp1:$PATH diff --git a/seafile-ignore.txt b/seafile-ignore.txt new file mode 100644 index 0000000..200ed1b --- /dev/null +++ b/seafile-ignore.txt @@ -0,0 +1,55 @@ +# https://help.seafile.com/syncing_client/excluding_files/ +# 注释。通配符:* 匹配0到若干个字符,包括代表目录的/。? 匹配1个字符,包括/。 +# seafile-ignore.txt 只能控制在客户端需要忽略哪些文件。你依然可以在 seahub 的 web 界面创建这些被客户端忽略的文件。 +# 在这种情况下, +# 这些文件会被同步到客户端,但是用户在客户端对这些文件的后续修改会被忽略,不会被同步回服务器。 +# 文件在服务器端的后续更改会被同步到客户端,如果客户端也同时修改了这些文件,系统会生成冲突文件。 +# seafile-ignore.txt 只能忽略还没有被同步的文件。对于已经被同步的文件,如果后来把它添加到 seafile-ignore.txt 中,系统只会忽略后续更改,已经上传的版本不会受影响。 + +# 自定义的后缀名,凡有 sfignore 后缀的都不进行同步 +*.sfignore +*.sfignore/ + +.DS_Store +*/.DS_Store + +.thumbnails +*/.thumbnails + +Thumbs.db +*/Thumbs.db +thumbs.db +*/thumbs.db + +_desktop.ini +*/_desktop.ini + +._* +*/._* + +.$* +*/.$* + +~$* +*/~$* + +node_modules/ +*/node_modules/ + +.svn/ +*/.svn/ + +.deploy_git/ +*/.deploy_git/ + +unpackage/dist/ +*/unpackage/dist/ + +unpackage/release/ +*/unpackage/release/ + +unpackage/cache/ +*/unpackage/cache/ + +Icon +OneDrive/Icon