From 33cbc795eacfda3a651158a18189e2c2bbb69ea0 Mon Sep 17 00:00:00 2001
From: 陈炜 <5856420@qq.com>
Date: 星期四, 05 十二月 2024 11:27:11 +0800
Subject: [PATCH] 删除部分文件
---
/dev/null | 0
1 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/Coding/.vscode/launch.json b/Coding/.vscode/launch.json
deleted file mode 100644
index b80908c..0000000
--- a/Coding/.vscode/launch.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- // 浣跨敤 IntelliSense 浜嗚В鐩稿叧灞炴�с��
- // 鎮仠浠ユ煡鐪嬬幇鏈夊睘鎬х殑鎻忚堪銆�
- // 娆蹭簡瑙f洿澶氫俊鎭紝璇疯闂�: https://go.microsoft.com/fwlink/?linkid=830387
- "version": "0.2.0",
- "configurations": [
- {
- "name": "Python: 褰撳墠鏂囦欢",
- "type": "python",
- "request": "launch",
- "program": "${file}",
- "console": "integratedTerminal"
- }
- ]
-}
\ No newline at end of file
diff --git a/Coding/192.168.31.254/haproxy.cfg b/Coding/192.168.31.254/haproxy.cfg
deleted file mode 100644
index 4b98d00..0000000
--- a/Coding/192.168.31.254/haproxy.cfg
+++ /dev/null
@@ -1,142 +0,0 @@
-#---------------------------------------------------------------------
-# Example configuration for a possible web application. See the
-# full configuration options online.
-#
-# http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
-#
-#---------------------------------------------------------------------
-
-#---------------------------------------------------------------------
-# Global settings
-#---------------------------------------------------------------------
-global
- # to have these messages end up in /var/log/haproxy.log you will
- # need to:
- #
- # 1) configure syslog to accept network log events. This is done
- # by adding the '-r' option to the SYSLOGD_OPTIONS in
- # /etc/sysconfig/syslog
- #
- # 2) configure local2 events to go to the /var/log/haproxy.log
- # file. A line like the following can be added to
- # /etc/sysconfig/syslog
- #
- # local2.* /var/log/haproxy.log
- #
- log 127.0.0.1 local2
-
- chroot /var/lib/haproxy
- pidfile /var/run/haproxy.pid
- maxconn 100000
- user haproxy
- group haproxy
- daemon
-
- # turn on stats unix socket
- stats socket /var/lib/haproxy/stats
-
-#---------------------------------------------------------------------
-# common defaults that all the 'listen' and 'backend' sections will
-# use if not designated in their block
-#---------------------------------------------------------------------
-defaults
- mode http
- log global
- option httplog
- option dontlognull
- option http-server-close
- option forwardfor
-# option forwardfor except 127.0.0.0/8
- option redispatch
- retries 3
- timeout http-request 10s
- timeout queue 1m
- timeout connect 3s
- timeout client 1m
- timeout server 1m
- timeout http-keep-alive 10s
- timeout check 10s
- maxconn 3000
-
-listen admin_stats
- bind *:8088
- mode http
- option httplog
- maxconn 10
- stats enable
- stats refresh 30s
- stats uri /stats
- stats realm Haproxy Manager
- stats auth admin:philips888_
- stats hide-version
-
-
-listen mps_8888
- bind *:8888
- mode http
- maxconn 1000
- balance source
- server 211 10.1.1.211:8888 weight 1 maxconn 3000 check inter 5000
-# server 02 10.1.1.212:8888 weight 1 maxconn 3000 check inter 5000
-# server 03 10.1.1.213:8888 weight 1 maxconn 3000 check inter 5000
-# server 04 10.1.1.214:8888 weight 1 maxconn 3000 check inter 5000
-
-
-listen comm_3099
- bind *:3099
- mode tcp
- option tcplog
- maxconn 50000
- balance leastconn
- server 211 10.1.1.211:3099 weight 2 maxconn 15000 check inter 10000
-# server 02 10.1.1.212:3099 weight 2 maxconn 15000 check inter 10000
-# server 03 10.1.1.213:3099 weight 2 maxconn 15000 check inter 10000
-# server 04 10.1.1.214:3099 weight 2 maxconn 15000 check inter 10000
-
-listen ftp21
- bind *:21
- mode tcp
- option tcplog
- maxconn 40960
- balance leastconn
- server 211 10.1.1.211 weight 3 maxconn 3000 check port 21 inter 3000s
-# server 212 10.1.1.212 weight 3 maxconn 3000 check port 21 inter 3000s
-# server 213 10.1.1.213 weight 3 maxconn 3000 check port 21 inter 3000s
-# server 214 10.1.1.214 weight 3 maxconn 3000 check port 21 inter 3000s
-
-listen ftp50000-52000 :50000-52000
- mode tcp
- option tcplog
- maxconn 3000
- server 211 10.1.1.211
-# server 212 10.1.1.212
-# server 213 10.1.1.213
-# server 214 10.1.1.214
-
-#---------------------------------------------------------------------
-# main frontend which proxys to the backends
-#---------------------------------------------------------------------
-#frontend main *:5000
-# acl url_static path_beg -i /static /images /javascript /stylesheets
-# acl url_static path_end -i .jpg .gif .png .css .js
-
-# use_backend static if url_static
-# default_backend app
-
-#---------------------------------------------------------------------
-# static backend for serving up images, stylesheets and such
-#---------------------------------------------------------------------
-#backend static
-# balance roundrobin
-# server static 127.0.0.1:4331 check
-
-#---------------------------------------------------------------------
-# round robin balancing between the various backends
-#---------------------------------------------------------------------
-#backend app
-# balance roundrobin
-# server app1 127.0.0.1:5001 check
-# server app2 127.0.0.1:5002 check
-# server app3 127.0.0.1:5003 check
-# server app4 127.0.0.1:5004 check
-
diff --git a/Coding/192.168.31.254/iptables b/Coding/192.168.31.254/iptables
deleted file mode 100644
index 6588c56..0000000
--- a/Coding/192.168.31.254/iptables
+++ /dev/null
@@ -1,18 +0,0 @@
-# Firewall configuration written by system-config-firewall
-# Manual customization of this file is not recommended.
-*filter
-:INPUT ACCEPT [0:0]
-:FORWARD ACCEPT [0:0]
-:OUTPUT ACCEPT [0:0]
--A INPUT -p tcp -m tcp --dport 50000:52000 -j ACCEPT
--A INPUT -p tcp -m tcp --dport 20:21 -j ACCEPT
--A INPUT -p tcp -m tcp --dport 3099 -j ACCEPT
--A INPUT -p tcp -m tcp --dport 8088 -j ACCEPT
--A INPUT -p tcp -m tcp --dport 8888 -j ACCEPT
--A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
--A INPUT -p icmp -j ACCEPT
--A INPUT -i lo -j ACCEPT
--A INPUT -m state --state NEW -m tcp -p tcp --dport 2000 -j ACCEPT
--A INPUT -j REJECT --reject-with icmp-host-prohibited
--A FORWARD -j REJECT --reject-with icmp-host-prohibited
-COMMIT
\ No newline at end of file
diff --git a/Coding/192.168.31.254/sshd_config b/Coding/192.168.31.254/sshd_config
deleted file mode 100644
index f6af8ba..0000000
--- a/Coding/192.168.31.254/sshd_config
+++ /dev/null
@@ -1,138 +0,0 @@
-# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $
-
-# This is the sshd server system-wide configuration file. See
-# sshd_config(5) for more information.
-
-# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin
-
-# The strategy used for options in the default sshd_config shipped with
-# OpenSSH is to specify options with their default value where
-# possible, but leave them commented. Uncommented options change a
-# default value.
-
-Port 2000
-#AddressFamily any
-#ListenAddress 0.0.0.0
-#ListenAddress ::
-
-# Disable legacy (protocol version 1) support in the server for new
-# installations. In future the default will change to require explicit
-# activation of protocol 1
-Protocol 2
-
-# HostKey for protocol version 1
-#HostKey /etc/ssh/ssh_host_key
-# HostKeys for protocol version 2
-#HostKey /etc/ssh/ssh_host_rsa_key
-#HostKey /etc/ssh/ssh_host_dsa_key
-
-# Lifetime and size of ephemeral version 1 server key
-#KeyRegenerationInterval 1h
-#ServerKeyBits 1024
-
-# Logging
-# obsoletes QuietMode and FascistLogging
-#SyslogFacility AUTH
-SyslogFacility AUTHPRIV
-#LogLevel INFO
-
-# Authentication:
-
-#LoginGraceTime 2m
-#PermitRootLogin yes
-#StrictModes yes
-#MaxAuthTries 6
-#MaxSessions 10
-
-#RSAAuthentication yes
-#PubkeyAuthentication yes
-#AuthorizedKeysFile .ssh/authorized_keys
-#AuthorizedKeysCommand none
-#AuthorizedKeysCommandRunAs nobody
-
-# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
-#RhostsRSAAuthentication no
-# similar for protocol version 2
-#HostbasedAuthentication no
-# Change to yes if you don't trust ~/.ssh/known_hosts for
-# RhostsRSAAuthentication and HostbasedAuthentication
-#IgnoreUserKnownHosts no
-# Don't read the user's ~/.rhosts and ~/.shosts files
-#IgnoreRhosts yes
-
-# To disable tunneled clear text passwords, change to no here!
-#PasswordAuthentication yes
-#PermitEmptyPasswords no
-PasswordAuthentication yes
-
-# Change to no to disable s/key passwords
-#ChallengeResponseAuthentication yes
-ChallengeResponseAuthentication no
-
-# Kerberos options
-#KerberosAuthentication no
-#KerberosOrLocalPasswd yes
-#KerberosTicketCleanup yes
-#KerberosGetAFSToken no
-#KerberosUseKuserok yes
-
-# GSSAPI options
-#GSSAPIAuthentication no
-GSSAPIAuthentication yes
-#GSSAPICleanupCredentials yes
-GSSAPICleanupCredentials yes
-#GSSAPIStrictAcceptorCheck yes
-#GSSAPIKeyExchange no
-
-# Set this to 'yes' to enable PAM authentication, account processing,
-# and session processing. If this is enabled, PAM authentication will
-# be allowed through the ChallengeResponseAuthentication and
-# PasswordAuthentication. Depending on your PAM configuration,
-# PAM authentication via ChallengeResponseAuthentication may bypass
-# the setting of "PermitRootLogin without-password".
-# If you just want the PAM account and session checks to run without
-# PAM authentication, then enable this but set PasswordAuthentication
-# and ChallengeResponseAuthentication to 'no'.
-#UsePAM no
-UsePAM yes
-
-# Accept locale-related environment variables
-AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
-AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
-AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
-AcceptEnv XMODIFIERS
-
-#AllowAgentForwarding yes
-#AllowTcpForwarding yes
-#GatewayPorts no
-#X11Forwarding no
-X11Forwarding yes
-#X11DisplayOffset 10
-#X11UseLocalhost yes
-#PrintMotd yes
-#PrintLastLog yes
-#TCPKeepAlive yes
-#UseLogin no
-#UsePrivilegeSeparation yes
-#PermitUserEnvironment no
-#Compression delayed
-#ClientAliveInterval 0
-#ClientAliveCountMax 3
-#ShowPatchLevel no
-#UseDNS yes
-#PidFile /var/run/sshd.pid
-#MaxStartups 10:30:100
-#PermitTunnel no
-#ChrootDirectory none
-
-# no default banner path
-#Banner none
-
-# override default of no subsystems
-Subsystem sftp /usr/libexec/openssh/sftp-server
-
-# Example of overriding settings on a per-user basis
-#Match User anoncvs
-# X11Forwarding no
-# AllowTcpForwarding no
-# ForceCommand cvs server
diff --git a/Coding/61.129.251.135/haproxy.cfg b/Coding/61.129.251.135/haproxy.cfg
deleted file mode 100644
index 8911e7f..0000000
--- a/Coding/61.129.251.135/haproxy.cfg
+++ /dev/null
@@ -1,161 +0,0 @@
-#---------------------------------------------------------------------
-# Example configuration for a possible web application. See the
-# full configuration options online.
-#
-# http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
-#
-#---------------------------------------------------------------------
-
-#---------------------------------------------------------------------
-# Global settings
-#---------------------------------------------------------------------
-global
- # to have these messages end up in /var/log/haproxy.log you will
- # need to:
- #
- # 1) configure syslog to accept network log events. This is done
- # by adding the '-r' option to the SYSLOGD_OPTIONS in
- # /etc/sysconfig/syslog
- #
- # 2) configure local2 events to go to the /var/log/haproxy.log
- # file. A line like the following can be added to
- # /etc/sysconfig/syslog
- #
- # local2.* /var/log/haproxy.log
- #
- log 127.0.0.1 local2
-
- chroot /var/lib/haproxy
- pidfile /var/run/haproxy.pid
- maxconn 100000
- user haproxy
- group haproxy
- daemon
-
- # turn on stats unix socket
- stats socket /var/lib/haproxy/stats
-
-#---------------------------------------------------------------------
-# common defaults that all the 'listen' and 'backend' sections will
-# use if not designated in their block
-#---------------------------------------------------------------------
-defaults
- mode http
- log global
- option httplog
- option dontlognull
- option http-server-close
-# option forwardfor except 127.0.0.0/8
- option redispatch
- retries 3
- timeout http-request 10s
- timeout queue 1m
- timeout connect 3s
- timeout client 1m
- timeout server 1m
- timeout http-keep-alive 10s
- timeout check 10s
- maxconn 3000
-
-listen admin_stats
- bind *:8088
- mode http
- option httplog
- maxconn 10
- stats enable
- stats refresh 30s
- stats uri /stats
- stats realm Haproxy Manager
- stats auth admin:philips888_
- stats hide-version
-
-
-listen mps_8888
- bind *:8888
- mode http
- maxconn 1000
- balance source
-# server 132 61.129.251.132:8888 redir http://61.129.251.132:8888 weight 1 maxconn 3000 check inter 5000
-# server 133 61.129.251.133:8888 redir http://61.129.251.133:8888 weight 1 maxconn 3000 check inter 5000
- server 144 61.129.251.144:8888 weight 1 maxconn 3000 check inter 5000
-# server 132 61.129.251.132:8888 weight 1 maxconn 3000 check inter 5000
-# server 188 61.129.251.188:8888 weight 1 maxconn 3000 check inter 5000
-
-
-#listen mps_8080
-# bind 61.129.251.135:8080
-# mode http
-# maxconn 1000
-# balance source
-# server 132 61.129.251.132:8888 weight 1 maxconn 3000 check inter 5000
-# server 133 61.129.251.133:8888 weight 1 maxconn 3000 check inter 5000
-# server 144 61.129.251.144:8888 weight 1 maxconn 3000 check inter 5000
-# server 145 61.129.251.145:8888 weight 1 maxconn 3000 check inter 5000
-# server 253 61.129.251.188:8888 weight 1 maxconn 3000 check inter 5000
-
-listen comm_3099
- bind *:3099
- mode tcp
- option tcplog
- maxconn 50000
- balance leastconn
-# server 132 61.129.251.132:3099 weight 2 maxconn 15000 check inter 10000
-# server 133 61.129.251.133:3099 weight 2 maxconn 15000 check inter 10000
- server 144 61.129.251.144:3099 weight 2 maxconn 15000 check inter 10000
- server 132 61.129.251.132:3099 weight 2 maxconn 15000 check inter 10000
-# server 188 61.129.251.188:3099 weight 2 maxconn 15000 check inter 10000
-
-listen ftp21
- bind *:21
- mode tcp
- option tcplog
- maxconn 40960
- balance leastconn
-# server 132 61.129.251.132 weight 3 maxconn 3000 check port 21 inter 3000s
-# server 133 61.129.251.133 weight 3 maxconn 3000 check port 21 inter 3000s
- server 144 61.129.251.144 weight 3 maxconn 3000 check port 21 inter 3000s
- server 132 61.129.251.132 weight 3 maxconn 3000 check port 21 inter 3000s
-# server 188 61.129.251.188 weight 3 maxconn 3000 check port 21 inter 3000s
-# server 148 192.168.100.148 weight 3 maxconn 3000 check port 21 inter 3000s
-# server 188 192.168.100.188 weight 3 maxconn 3000 check port 21 inter 3000s
-
-listen ftp52
- bind *:50000-52000
- mode tcp
- option tcplog
- maxconn 3000
-# server 132 61.129.251.132
-# server 133 61.129.251.133
- server 144 61.129.251.144
- server 132 61.129.251.132
-# server 188 61.129.251.188
-# server 148 192.168.100.148
-# server 188 192.168.100.188
-
-#---------------------------------------------------------------------
-# main frontend which proxys to the backends
-#---------------------------------------------------------------------
-#frontend main *:5000
-# acl url_static path_beg -i /static /images /javascript /stylesheets
-# acl url_static path_end -i .jpg .gif .png .css .js
-
-# use_backend static if url_static
-# default_backend app
-
-#---------------------------------------------------------------------
-# static backend for serving up images, stylesheets and such
-#---------------------------------------------------------------------
-#backend static
-# balance roundrobin
-# server static 127.0.0.1:4331 check
-
-#---------------------------------------------------------------------
-# round robin balancing between the various backends
-#---------------------------------------------------------------------
-#backend app
-# balance roundrobin
-# server app1 127.0.0.1:5001 check
-# server app2 127.0.0.1:5002 check
-# server app3 127.0.0.1:5003 check
-# server app4 127.0.0.1:5004 check
-
diff --git a/Coding/Python/1.py b/Coding/Python/1.py
deleted file mode 100644
index ed2f386..0000000
--- a/Coding/Python/1.py
+++ /dev/null
@@ -1,2 +0,0 @@
-name = input ('Please enter your name:')
-print (name)
\ No newline at end of file
diff --git a/Coding/Python/c9-python-getting-started b/Coding/Python/c9-python-getting-started
deleted file mode 160000
index f7d585a..0000000
--- a/Coding/Python/c9-python-getting-started
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit f7d585aa0b2873e706ed4b5a5a7a497016665f02
diff --git "a/Coding/Python/\347\254\254\344\270\211\346\211\271" "b/Coding/Python/\347\254\254\344\270\211\346\211\271"
deleted file mode 100644
index e69de29..0000000
--- "a/Coding/Python/\347\254\254\344\270\211\346\211\271"
+++ /dev/null
diff --git a/Coding/verysync-installer/etc/.DS_Store b/Coding/verysync-installer/etc/.DS_Store
deleted file mode 100644
index 61adfff..0000000
--- a/Coding/verysync-installer/etc/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/Coding/verysync-installer/etc/linux-init.d/verysync b/Coding/verysync-installer/etc/linux-init.d/verysync
deleted file mode 100644
index 8b62329..0000000
--- a/Coding/verysync-installer/etc/linux-init.d/verysync
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: verysync
-# Required-Start: $network $local_fs $remote_fs
-# Required-Stop: $remote_fs
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: verysync services
-# Description: verysync services
-### END INIT INFO
-
-
-DESC=verysync
-NAME=verysync
-DAEMON=/usr/bin/verysync/verysync
-PIDFILE=/var/run/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-PATH="/usr/bin/verysync:$PATH"
-
-VSHOME="$HOME/.config/verysync"
-USER="root"
-DAEMON_OPTS="-gui-address :8886"
-
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-start_daemon ()
-{
- if [[ -n "${VSHOME}" && -d "$VSHOME" ]]; then
- chown -R ${USER}:${USER} "${VSHOME}"
- fi
- #su - ${USER} -s "/bin/sh" -c "umask 000; PATH=${PATH} ${VERYSYNC} $VERYSYNC_OPTIONS"
- start-stop-daemon -b -o -c ${USER} -S -u ${USER} -k 002 -x env HOME="${VSHOME}" ${DAEMON} -- ${DAEMON_OPTS}
-}
-
-stop_daemon ()
-{
- #kill `cat ${PID_FILE}`
- #wait_for_status 1 60 || kill -9 `cat ${PID_FILE}`
- #rm -f ${PID_FILE}
- start-stop-daemon -o -c ${USER} -K -u ${USER} -x ${DAEMON}
- wait_for_status 1 20 || start-stop-daemon -K -s 9 -q -x ${DAEMON}
-}
-
-daemon_status ()
-{
- # if [ -f ${PID_FILE} ] && kill -0 `cat ${PID_FILE}` > /dev/null 2>&1; then
- # return
- # fi
- # rm -f ${PID_FILE}
- # return 1
- start-stop-daemon -K -q -t -u ${USER} -x ${DAEMON}
- [ $? -eq 0 ] || return 1
-}
-
-# wait_for_status ()
-# {
-# counter=$2
-# while [ ${counter} -gt 0 ]; do
-# daemon_status
-# [ $? -eq $1 ] && return
-# let counter=counter-1
-# sleep 1
-# done
-# return 1
-# }
-wait_for_status ()
-{
- counter=$2
- while [ ${counter} -gt 0 ]; do
- daemon_status
- [ $? -eq $1 ] && return
- let counter=counter-1
- sleep 1
- done
- return 1
-}
-
-case $1 in
- start)
- if daemon_status; then
- echo ${NAME} is already running
- else
- echo Starting ${NAME} ...
- start_daemon
- fi
- ;;
- stop)
- if daemon_status; then
- echo Stopping ${NAME} ...
- stop_daemon
- else
- echo ${NAME} is not running
- fi
- ;;
- status)
- if daemon_status; then
- echo ${NAME} is running
- exit 0
- else
- echo ${NAME} is not running
- exit 1
- fi
- ;;
- log)
- exit 1
- ;;
- *)
- exit 1
- ;;
-esac
diff --git a/Coding/verysync-installer/etc/linux-systemd/.DS_Store b/Coding/verysync-installer/etc/linux-systemd/.DS_Store
deleted file mode 100644
index c7f175f..0000000
--- a/Coding/verysync-installer/etc/linux-systemd/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/Coding/verysync-installer/etc/linux-systemd/system/verysync.service b/Coding/verysync-installer/etc/linux-systemd/system/verysync.service
deleted file mode 100644
index cf153e7..0000000
--- a/Coding/verysync-installer/etc/linux-systemd/system/verysync.service
+++ /dev/null
@@ -1,18 +0,0 @@
-[Unit]
-Description=Verysync - Verysync File Synchronization for %I
-After=network.target
-
-[Service]
-# User=verysync
-# Group=verysync
-User=root
-Group=root
-Type=simple
-ExecStart=/usr/bin/verysync/verysync -gui-address :8886 -no-browser __VSHOME_HOLDER__
-Restart=on-failure
-SuccessExitStatus=3 4
-RestartForceExitStatus=3 4
-LimitNOFILE=200000
-
-[Install]
-WantedBy=multi-user.target
diff --git a/Coding/verysync-installer/etc/linux-systemv/verysync b/Coding/verysync-installer/etc/linux-systemv/verysync
deleted file mode 100644
index 2abc4fb..0000000
--- a/Coding/verysync-installer/etc/linux-systemv/verysync
+++ /dev/null
@@ -1,152 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: verysync
-# Required-Start: $network $local_fs $remote_fs
-# Required-Stop: $remote_fs
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Verysync services
-# Description: Verysync services
-### END INIT INFO
-
-
-DESC=verysync
-NAME=verysync
-DAEMON=/usr/bin/verysync/verysync
-PIDFILE=/var/run/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-VSHOME=""
-DAEMON_OPTS="-gui-address :8886 -no-browser -logflags=0"
-
-[ -n "$VSHOME" ] && DAEMON_OPTS="$DAEMON_OPTS -home $VSHOME"
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-# Read configuration variable file if it is present
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-# Load the VERBOSE setting and other rcS variables
-. /lib/init/vars.sh
-
-# Define LSB log_* functions.
-# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
-. /lib/lsb/init-functions
-
-#
-# Function that starts the daemon/service
-#
-do_start()
-{
- mkdir -p /var/log/verysync
- # Return
- # 0 if daemon has been started
- # 1 if daemon was already running
- # 2 if daemon could not be started
- # 3 if configuration file not ready for daemon
- start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
- || return 1
- start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --background -m -- $DAEMON_OPTS \
- || return 2
- # Add code here, if necessary, that waits for the process to be ready
- # to handle requests from services started subsequently which depend
- # on this one. As a last resort, sleep for some time.
-}
-
-#
-# Function that stops the daemon/service
-#
-do_stop()
-{
- # Return
- # 0 if daemon has been stopped
- # 1 if daemon was already stopped
- # 2 if daemon could not be stopped
- # other if a failure occurred
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
- RETVAL="$?"
- [ "$RETVAL" = 2 ] && return 2
- # Wait for children to finish too if this is a daemon that forks
- # and if the daemon is only ever run from this initscript.
- # If the above conditions are not satisfied then add some other code
- # that waits for the process to drop all resources that could be
- # needed by services started subsequently. A last resort is to
- # sleep for some time.
- start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
- [ "$?" = 2 ] && return 2
- # Many daemons don't delete their pidfiles when they exit.
- rm -f $PIDFILE
- return "$RETVAL"
-}
-
-#
-# Function that sends a SIGHUP to the daemon/service
-#
-do_reload() {
- #
- # If the daemon can reload its configuration without
- # restarting (for example, when it is sent a SIGHUP),
- # then implement that here.
- #
- start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE
- return 0
-}
-
-case "$1" in
- start)
- [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
- do_start
- case "$?" in
- 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
- 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
- esac
- ;;
- stop)
- [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
- 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
- esac
- ;;
- status)
- status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
- ;;
- reload|force-reload)
- #
- # If do_reload() is not implemented then leave this commented out
- # and leave 'force-reload' as an alias for 'restart'.
- #
- log_daemon_msg "Reloading $DESC" "$NAME"
- do_reload
- log_end_msg $?
- ;;
- restart|force-reload)
- #
- # If the "reload" option is implemented then remove the
- # 'force-reload' alias
- #
- log_daemon_msg "Restarting $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1)
- do_start
- case "$?" in
- 0) log_end_msg 0 ;;
- 1) log_end_msg 1 ;; # Old process is still running
- *) log_end_msg 1 ;; # Failed to start
- esac
- ;;
- *)
- # Failed to stop
- log_end_msg 1
- ;;
- esac
- ;;
- *)
- #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
- echo "Usage: $SCRIPTNAME {start|stop|status|reload|restart|force-reload}" >&2
- exit 3
- ;;
-esac
diff --git a/Coding/verysync-installer/go-inst.sh b/Coding/verysync-installer/go-inst.sh
deleted file mode 100644
index 35ebe91..0000000
--- a/Coding/verysync-installer/go-inst.sh
+++ /dev/null
@@ -1,484 +0,0 @@
-#!/bin/bash
-
-# This file is accessible as https://install.direct/go.sh
-
-# If not specify, default meaning of return value:
-# 0: Success
-# 1: System error
-# 2: Application error
-# 3: Network error
-
-CUR_VER=""
-NEW_VER=""
-ARCH=""
-VDIS="amd64"
-ZIPFILE="/tmp/verysync/verysync.zip"
-VERYSYNC_RUNNING=0
-
-CMD_INSTALL=""
-CMD_UPDATE=""
-SOFTWARE_UPDATED=0
-
-SYSTEMCTL_CMD=$(command -v systemctl 2>/dev/null)
-SERVICE_CMD=$(command -v service 2>/dev/null)
-
-CHECK=""
-FORCE=""
-HELP=""
-VSHOME=""
-
-#######color code########
-RED="31m" # Error message
-GREEN="32m" # Success message
-YELLOW="33m" # Warning message
-BLUE="36m" # Info message
-
-
-#########################
-while [[ $# > 0 ]];do
- key="$1"
- case $key in
- -p|--proxy)
- PROXY="-x ${2}"
- shift # past argument
- ;;
- -h|--help)
- HELP="1"
- ;;
- -f|--force)
- FORCE="1"
- ;;
- -c|--check)
- CHECK="1"
- ;;
- --remove)
- REMOVE="1"
- ;;
- --version)
- VERSION="$2"
- shift
- ;;
- -l|--local)
- LOCAL="$2"
- LOCAL_INSTALL="1"
- shift
- ;;
- -d|--home)
- VSHOME="$2"
- shift
- ;;
- *)
- # unknown option
- ;;
- esac
- shift # past argument or value
-done
-
-###############################
-colorEcho(){
- COLOR=$1
- echo -e "\033[${COLOR}${@:2}\033[0m"
-}
-
-sysArch(){
- ARCH=$(uname -m)
- if [[ "$ARCH" == "i686" ]] || [[ "$ARCH" == "i386" ]]; then
- VDIS="386"
- elif [[ "$ARCH" == "x86_64" ]]; then
- VDIS="amd64"
- elif [[ "$ARCH" == *"armv7"* ]] || [[ "$ARCH" == "armv6l" ]]; then
- VDIS="arm"
- elif [[ "$ARCH" == *"armv8"* ]] || [[ "$ARCH" == "aarch64" ]]; then
- VDIS="arm64"
- elif [[ "$ARCH" == *"mips64le"* ]]; then
- VDIS="mips64le"
- elif [[ "$ARCH" == *"mips64"* ]]; then
- VDIS="mips64"
- elif [[ "$ARCH" == *"mipsle"* ]]; then
- VDIS="mipsle"
- elif [[ "$ARCH" == *"mips"* ]]; then
- VDIS="mips"
- elif [[ "$ARCH" == *"s390x"* ]]; then
- VDIS="s390x"
- fi
- return 0
-}
-
-downloadVerysync(){
- rm -rf /tmp/verysync
- mkdir -p /tmp/verysync
- colorEcho ${BLUE} "Downloading verysync."
- #DOWNLOAD_LINK="https://github.com/verysync/releases/releases/download/${NEW_VER}/verysync-linux-${VDIS}-${NEW_VER}.tar.gz"
- DOWNLOAD_LINK="http://releases-cdn.verysync.com/releases/${NEW_VER}/verysync-linux-${VDIS}-${NEW_VER}.tar.gz"
- curl ${PROXY} -L -H "Cache-Control: no-cache" -o ${ZIPFILE} ${DOWNLOAD_LINK}
- if [ $? != 0 ];then
- colorEcho ${RED} "Failed to download! Please check your network or try again."
- return 3
- fi
- return 0
-}
-
-installSoftware(){
- COMPONENT=$1
- if [[ -n `command -v $COMPONENT` ]]; then
- return 0
- fi
-
- getPMT
- if [[ $? -eq 1 ]]; then
- colorEcho ${RED} "The system package manager tool isn't APT or YUM, please install ${COMPONENT} manually."
- return 1
- fi
- if [[ $SOFTWARE_UPDATED -eq 0 ]]; then
- colorEcho ${BLUE} "Updating software repo"
- $CMD_UPDATE
- SOFTWARE_UPDATED=1
- fi
-
- colorEcho ${BLUE} "Installing ${COMPONENT}"
- $CMD_INSTALL $COMPONENT
- if [[ $? -ne 0 ]]; then
- colorEcho ${RED} "Failed to install ${COMPONENT}. Please install it manually."
- return 1
- fi
- return 0
-}
-
-# return 1: not apt, yum, or zypper
-getPMT(){
- if [[ -n `command -v apt-get` ]];then
- CMD_INSTALL="apt-get -y -qq install"
- CMD_UPDATE="apt-get -qq update"
- elif [[ -n `command -v yum` ]]; then
- CMD_INSTALL="yum -y -q install"
- CMD_UPDATE="yum -q makecache"
- elif [[ -n `command -v zypper` ]]; then
- CMD_INSTALL="zypper -y install"
- CMD_UPDATE="zypper ref"
- else
- return 1
- fi
- return 0
-}
-
-
-extract(){
- colorEcho ${BLUE}"Extracting verysync package to /tmp/verysync."
- mkdir -p /tmp/verysync
- tar xzf $1 -C "/tmp/verysync/"
- if [[ $? -ne 0 ]]; then
- colorEcho ${RED} "Failed to extract verysync."
- return 2
- fi
- return 0
-}
-
-
-# 1: new verysync. 0: no. 2: not installed. 3: check failed. 4: don't check.
-getVersion(){
- if [[ -n "$VERSION" ]]; then
- NEW_VER="$VERSION"
- return 4
- else
- VER=`/usr/bin/verysync/verysync -version 2>/dev/null`
- RETVAL="$?"
- CUR_VER=`echo $VER | head -n 1 | cut -d " " -f2`
- #TAG_URL="https://api.github.com/repos/verysync/releases/releases/latest"
- TAG_URL="https://upgrades.verysync.cn/meta.json"
- NEW_VER=`curl ${PROXY} -k ${TAG_URL} --connect-timeout 10| grep 'tag_name' | cut -d\" -f4 | head -n 1`
- if [[ $? -ne 0 ]] || [[ $NEW_VER == "" ]]; then
- colorEcho ${RED} "Failed to fetch release information. Please check your network or try again."
- return 3
- elif [[ $RETVAL -ne 0 ]];then
- return 2
- elif [[ "$NEW_VER" != "$CUR_VER" ]];then
- return 1
- fi
- return 0
- fi
-}
-
-stopVerysync(){
- colorEcho ${BLUE} "Shutting down verysync service."
- if [[ -n "${SYSTEMCTL_CMD}" ]] || [[ -f "/lib/systemd/system/verysync.service" ]] || [[ -f "/etc/systemd/system/verysync.service" ]]; then
- ${SYSTEMCTL_CMD} stop verysync
- elif [[ -n "${SERVICE_CMD}" ]] || [[ -f "/etc/init.d/verysync" ]]; then
- ${SERVICE_CMD} verysync stop
- fi
- if [[ $? -ne 0 ]]; then
- colorEcho ${YELLOW} "Failed to shutdown verysync service."
- return 2
- fi
- return 0
-}
-
-startVerysync(){
- if [ -n "${SYSTEMCTL_CMD}" ] && [ -f "/lib/systemd/system/verysync.service" ]; then
- ${SYSTEMCTL_CMD} start verysync
- elif [ -n "${SYSTEMCTL_CMD}" ] && [ -f "/etc/systemd/system/verysync.service" ]; then
- ${SYSTEMCTL_CMD} start verysync
- elif [ -n "${SERVICE_CMD}" ] && [ -f "/etc/init.d/verysync" ]; then
- ${SERVICE_CMD} verysync start
- fi
- if [[ $? -ne 0 ]]; then
- colorEcho ${YELLOW} "Failed to start verysync service."
- return 2
- fi
- return 0
-}
-
-copyFile() {
- NAME=$1
- ERROR=`cp "/tmp/verysync/verysync-linux-${VDIS}-${NEW_VER}/${NAME}" "/usr/bin/verysync/${NAME}" 2>&1`
- if [[ $? -ne 0 ]]; then
- colorEcho ${YELLOW} "${ERROR}"
- return 1
- fi
- return 0
-}
-
-makeExecutable() {
- chmod +x "/usr/bin/verysync/$1"
-}
-
-installVerysync(){
- # Install verysync binary to /usr/bin/verysync
- if [[ -f /usr/bin/verysnc ]]; then
- rm -rf /usr/bin/verysync
- fi
- mkdir -p /usr/bin/verysync
- copyFile verysync
- if [[ $? -ne 0 ]]; then
- colorEcho ${RED} "Failed to copy verysync binary and resources."
- return 1
- fi
- makeExecutable verysync
-
- # Install verysync server config to /etc/verysync
- # if [[ ! -f "/etc/verysync/config.json" ]]; then
- # mkdir -p /etc/verysync
- # mkdir -p /var/log/verysync
- # cp "/tmp/verysync/verysync-${NEW_VER}-linux-${VDIS}/vpoint_vmess_freedom.json" "/etc/verysync/config.json"
- # if [[ $? -ne 0 ]]; then
- # colorEcho ${YELLOW} "Failed to create verysync configuration file. Please create it manually."
- # return 1
- # fi
- # let PORT=$RANDOM+10000
- # UUID=$(cat /proc/sys/kernel/random/uuid)
- #
- # sed -i "s/10086/${PORT}/g" "/etc/verysync/config.json"
- # sed -i "s/23ad6b10-8d1a-40f7-8ad0-e3e35cd38297/${UUID}/g" "/etc/verysync/config.json"
- #
- # colorEcho ${BLUE} "PORT:${PORT}"
- # colorEcho ${BLUE} "UUID:${UUID}"
- # fi
- # return 0
-}
-
-
-installInitScript(){
- if [[ -n "${SYSTEMCTL_CMD}" ]];then
- if [[ ! -f "/etc/systemd/system/verysync.service" ]]; then
- if [[ ! -f "/lib/systemd/system/verysync.service" ]]; then
- #cp "/tmp/verysync/verysync-linux-${VDIS}-${NEW_VER}/etc/linux-systemd/system/verysync.service" "/etc/systemd/system/"
- cp "etc/linux-systemd/system/verysync.service" "/etc/systemd/system/"
- if [[ -n "$VSHOME" ]]; then
- sed -i "s#__VSHOME_HOLDER__#-home \"$VSHOME\"#" /etc/systemd/system/verysync.service
- else
- sed -i "s/__VSHOME_HOLDER__//" /etc/systemd/system/verysync.service
- fi
- systemctl enable verysync.service
- systemctl start verysync.service
- fi
- fi
- return
- elif [[ -n "${SERVICE_CMD}" ]] && [[ ! -f "/etc/init.d/verysync" ]]; then
- # installSoftware "daemon"
- # installSoftware "daemon" || return $?
- # cp "/tmp/verysync/verysync-linux-${VDIS}-${NEW_VER}/etc/linux-systemv/verysync" "/etc/init.d/verysync"
-
- # if [[ $? -ne 0 ]]; then
- # fi
-
- if [[ -n `command -v chkconfig` ]]; then
- #Centos
- if [[ ! -f "start-stop-daemon/$VDIS" ]]; then
- installSoftware "daemon" || return $?
- else
- cp "start-stop-daemon/$VDIS" /usr/bin/verysync/start-stop-daemon
- chmod +x /usr/bin/verysync/start-stop-daemon
- fi
-
- cp "etc/linux-init.d/verysync" "/etc/init.d/verysync"
- chmod +x "/etc/init.d/verysync"
-
- if [[ -n "$VSHOME" ]]; then
- sed -i "s#^VSHOME=#VSHOME=\"$VSHOME\"#" /etc/systemd/system/verysync.service
- fi
-
-
- chkconfig --add verysync
- service verysync start
- elif [[ -n `command -v update-rc.d` ]]; then
- #Debian/Centos
- installSoftware "daemon" || return $?
-
- cp "etc/linux-systemv/verysync" "/etc/init.d/verysync"
- chmod +x "/etc/init.d/verysync"
-
- if [[ -n "$VSHOME" ]]; then
- sed -i "s#^VSHOME=#VSHOME=\"$VSHOME\"#" /etc/systemd/system/verysync.service
- fi
-
- update-rc.d verysync defaults
- fi
- fi
- return
-}
-
-Help(){
- echo "./go-installer.sh [-h] [-c] [--remove] [-p proxy] [-f] [--version vx.y.z] [-l file] [-d index location]"
- echo " -h, --help Show help"
- echo " -p, --proxy To download through a proxy server, use -p socks5://127.0.0.1:1080 or -p http://127.0.0.1:3128 etc"
- echo " -f, --force Force install"
- echo " --version Install a particular version, use --version v3.15"
- echo " -l, --local Install from a local file"
- echo " --remove Remove installed verysync"
- echo " -c, --check Check for update"
- echo " -d --home Verysync index data location, default ~/.config/verysync"
- return 0
-}
-
-remove(){
- if [[ -n "${SYSTEMCTL_CMD}" ]] && [[ -f "/etc/systemd/system/verysync.service" ]];then
- if pgrep "verysync" > /dev/null ; then
- stopVerysync
- fi
- systemctl disable verysync.service
- rm -rf "/usr/bin/verysync" "/etc/systemd/system/verysync.service"
- if [[ $? -ne 0 ]]; then
- colorEcho ${RED} "Failed to remove verysync."
- return 0
- else
- colorEcho ${GREEN} "Removed verysync successfully."
- colorEcho ${BLUE} "If necessary, please remove configuration file and log file manually."
- return 0
- fi
- elif [[ -n "${SYSTEMCTL_CMD}" ]] && [[ -f "/lib/systemd/system/verysync.service" ]];then
- if pgrep "verysync" > /dev/null ; then
- stopVerysync
- fi
- systemctl disable verysync.service
- rm -rf "/usr/bin/verysync/verysync" "/lib/systemd/system/verysync.service"
- if [[ $? -ne 0 ]]; then
- colorEcho ${RED} "Failed to remove verysync."
- return 0
- else
- colorEcho ${GREEN} "Removed verysync successfully."
- colorEcho ${BLUE} "If necessary, please remove configuration file and log file manually."
- return 0
- fi
- elif [[ -n "${SERVICE_CMD}" ]] && [[ -f "/etc/init.d/verysync" ]]; then
- if pgrep "verysync" > /dev/null ; then
- stopVerysync
- fi
- rm -rf "/usr/bin/verysync" "/etc/init.d/verysync"
- if [[ $? -ne 0 ]]; then
- colorEcho ${RED} "Failed to remove verysync."
- return 0
- else
- colorEcho ${GREEN} "Removed verysync successfully."
- colorEcho ${BLUE} "If necessary, please remove configuration file and log file manually."
- return 0
- fi
- else
- colorEcho ${YELLOW} "verysync not found."
- return 0
- fi
-}
-
-checkUpdate(){
- echo "Checking for update."
- VERSION=""
- getVersion
- RETVAL="$?"
- if [[ $RETVAL -eq 1 ]]; then
- colorEcho ${BLUE} "Found new version ${NEW_VER} for verysync.(Current version:$CUR_VER)"
- elif [[ $RETVAL -eq 0 ]]; then
- colorEcho ${BLUE} "No new version. Current version is ${NEW_VER}."
- elif [[ $RETVAL -eq 2 ]]; then
- colorEcho ${YELLOW} "No verysync installed."
- colorEcho ${BLUE} "The newest version for verysync is ${NEW_VER}."
- fi
- return 0
-}
-
-main(){
- #helping information
- [[ "$HELP" == "1" ]] && Help && return
- [[ "$CHECK" == "1" ]] && checkUpdate && return
- [[ "$REMOVE" == "1" ]] && remove && return
-
- [[ -n "$VSHOME" && -f "$VSHOME" ]] && colorEcho {$RED} "$VSHOME is not directory path" && return
-
- if [[ -n "$VSHOME" && ! -d "$VSHOME" ]]; then
- mkdir -p "$VSHOME"
- if [[ $? -ne 0 ]]; then
- colorEcho {$RED} "create $VSHOME fails"
- return 1
- fi
- fi
-
-
-
- sysArch
- # extract local file
- if [[ $LOCAL_INSTALL -eq 1 ]]; then
- echo "Installing verysync via local file"
- installSoftware unzip || return $?
- rm -rf /tmp/verysync
- extract $LOCAL || return $?
- FILEVDIS=`ls /tmp/verysync |grep "verysync-linux-${VDIS}-v" |cut -d "-" -f3`
- SYSTEM=`ls /tmp/verysync |grep "verysync-linux-${VDIS}-v" |cut -d "-" -f2`
- if [[ ${SYSTEM} != "linux" ]]; then
- colorEcho ${RED} "The local verysync can not be installed in linux."
- return 1
- elif [[ ${FILEVDIS} != ${VDIS} ]]; then
- colorEcho ${RED} "The local verysync can not be installed in ${ARCH} system."
- return 1
- else
- NEW_VER=`ls /tmp/verysync |grep "verysync-linux-${VDIS}-v" |cut -d "-" -f4,5`
- fi
- else
- # download via network and extract
- installSoftware "curl" || return $?
- getVersion
- RETVAL="$?"
- if [[ $RETVAL == 0 ]] && [[ "$FORCE" != "1" ]]; then
- colorEcho ${BLUE} "Latest version ${NEW_VER} is already installed."
- return
- elif [[ $RETVAL == 3 ]]; then
- return 3
- else
- colorEcho ${BLUE} "Installing verysync ${NEW_VER} on ${ARCH}"
- downloadVerysync || return $?
- installSoftware unzip || return $?
- extract ${ZIPFILE} || return $?
- fi
- fi
- if pgrep "verysync" > /dev/null ; then
- VERYSYNC_RUNNING=1
- stopVerysync
- fi
- installVerysync || return $?
- installInitScript || return $?
- if [[ ${VERYSYNC_RUNNING} -eq 1 ]];then
- colorEcho ${BLUE} "Restarting verysync service."
- startVerysync
- fi
- colorEcho ${GREEN} "Verysync ${NEW_VER} is installed."
- rm -rf /tmp/verysync
- return 0
-}
-
-main
diff --git a/Coding/verysync-installer/go-install.sh b/Coding/verysync-installer/go-install.sh
deleted file mode 100644
index e69de29..0000000
--- a/Coding/verysync-installer/go-install.sh
+++ /dev/null
diff --git a/Coding/verysync-installer/start-stop-daemon/amd64 b/Coding/verysync-installer/start-stop-daemon/amd64
deleted file mode 100644
index 0935ab8..0000000
--- a/Coding/verysync-installer/start-stop-daemon/amd64
+++ /dev/null
Binary files differ
diff --git a/Coding/verysync-installer/start-stop-daemon/arm b/Coding/verysync-installer/start-stop-daemon/arm
deleted file mode 100644
index 1f51163..0000000
--- a/Coding/verysync-installer/start-stop-daemon/arm
+++ /dev/null
Binary files differ
diff --git a/Coding/verysync-installer/start-stop-daemon/arm64 b/Coding/verysync-installer/start-stop-daemon/arm64
deleted file mode 100644
index 9de8d43..0000000
--- a/Coding/verysync-installer/start-stop-daemon/arm64
+++ /dev/null
Binary files differ
diff --git a/Coding/verysync-installer/start-stop-daemon/i386 b/Coding/verysync-installer/start-stop-daemon/i386
deleted file mode 100644
index 22d5d68..0000000
--- a/Coding/verysync-installer/start-stop-daemon/i386
+++ /dev/null
Binary files differ
--
Gitblit v1.10.0