diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..36a4a78 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.idea/ diff --git a/backend/kms-cli.php b/backend/kms-cli.php index e80a931..bcc01ec 100644 --- a/backend/kms-cli.php +++ b/backend/kms-cli.php @@ -49,4 +49,4 @@ function showWinServerKeys() { // 显示Windows Server的KMS密钥 showKmsKeys($kmsKeys); } -?> \ No newline at end of file +?> diff --git a/backend/kms-help.php b/backend/kms-help.php index f6b24cb..c6152bb 100644 --- a/backend/kms-help.php +++ b/backend/kms-help.php @@ -44,4 +44,4 @@ function webHelp() { echo '">KMS_KEY (Windows Server)

'; } -?> \ No newline at end of file +?> diff --git a/backend/kms-keys.php b/backend/kms-keys.php index fdac760..2482a3f 100644 --- a/backend/kms-keys.php +++ b/backend/kms-keys.php @@ -40,4 +40,4 @@ function getKmsKeys($type) { // 获取所有版本的KMS密钥 return $data; } -?> \ No newline at end of file +?> diff --git a/backend/kms-office.php b/backend/kms-office.php index bc619b8..baf31d2 100644 --- a/backend/kms-office.php +++ b/backend/kms-office.php @@ -112,4 +112,4 @@ function webOfficeHelp() { // 网页输出Office激活帮助 echo ''; } -?> \ No newline at end of file +?> diff --git a/backend/kms-web.php b/backend/kms-web.php index f5dfff8..c7b6bf2 100644 --- a/backend/kms-web.php +++ b/backend/kms-web.php @@ -31,4 +31,4 @@ function webWinServerKeys() { // 网页显示Windows Server的KMS密钥 webKmsKeys($kmsKeys, 'Windows Server KMS Keys'); } -?> \ No newline at end of file +?> diff --git a/conf/docker/iconv.sh b/conf/docker/iconv.sh index dbbc15e..2234982 100644 --- a/conf/docker/iconv.sh +++ b/conf/docker/iconv.sh @@ -3,20 +3,20 @@ mkdir -p /tmp wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz -O /tmp/libiconv.tar.gz tar xf /tmp/libiconv.tar.gz -C /tmp -cd /tmp/libiconv-1.16/ +cd /tmp/libiconv-1.16/ || exit sed -i 's/_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");/#if HAVE_RAW_DECL_GETS\n_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");\n#endif/g' srclib/stdio.in.h ./configure --prefix=/usr/local make && make install -php_version=`php -r "phpinfo();" | grep "PHP Version" | head -1` +php_version=$(php -r "phpinfo();" | grep "PHP Version" | head -1) php_version=${php_version#*=> } -wget http://php.net/distributions/php-$php_version.tar.gz -O /tmp/php.tar.gz +wget http://php.net/distributions/php-"$php_version".tar.gz -O /tmp/php.tar.gz tar xf /tmp/php.tar.gz -C /tmp -cd /tmp/php-$php_version/ext/iconv +cd /tmp/php-"$php_version"/ext/iconv || exit phpize ./configure --with-iconv=/usr/local make && make install mkdir /tmp/iconv cp /usr/local/lib/libiconv.so /tmp/iconv -cp /usr/lib/php7/modules/iconv.so /tmp/iconv \ No newline at end of file +cp /usr/lib/php7/modules/iconv.so /tmp/iconv diff --git a/conf/docker/init.sh b/conf/docker/init.sh index a9c5095..773addf 100644 --- a/conf/docker/init.sh +++ b/conf/docker/init.sh @@ -1,4 +1,4 @@ /usr/sbin/php-fpm7 /usr/sbin/nginx echo "KMS-Server initialization completed." -/usr/bin/vlmcsd -De \ No newline at end of file +/usr/bin/vlmcsd -De diff --git a/conf/docker/kms.conf b/conf/docker/kms.conf index ea438f5..f2d5f3c 100644 --- a/conf/docker/kms.conf +++ b/conf/docker/kms.conf @@ -14,4 +14,4 @@ server { } location /assets {} -} \ No newline at end of file +} diff --git a/conf/docker/nginx.conf b/conf/docker/nginx.conf index 6e34c13..41ac84a 100644 --- a/conf/docker/nginx.conf +++ b/conf/docker/nginx.conf @@ -10,4 +10,4 @@ events { http { include /etc/nginx/mime.types; include /etc/nginx/kms.conf; -} \ No newline at end of file +} diff --git a/conf/docker/vlmcsd.sh b/conf/docker/vlmcsd.sh index afde0cd..1289d1e 100644 --- a/conf/docker/vlmcsd.sh +++ b/conf/docker/vlmcsd.sh @@ -1,9 +1,8 @@ apk add --no-cache git make build-base git clone --branch master --single-branch https://github.com/Wind4/vlmcsd.git /tmp/vlmcsd-build -cd /tmp/vlmcsd-build -make +cd /tmp/vlmcsd-build || exit && make mkdir /tmp/vlmcsd cp /tmp/vlmcsd-build/bin/vlmcs /tmp/vlmcsd/ cp /tmp/vlmcsd-build/bin/vlmcsd /tmp/vlmcsd/ cp /tmp/vlmcsd-build/etc/vlmcsd.kmd /tmp/vlmcsd/ -rm -rf /tmp/vlmcsd-build \ No newline at end of file +rm -rf /tmp/vlmcsd-build diff --git a/conf/nginx/docker.conf b/conf/nginx/docker.conf index e379015..0c0b71b 100644 --- a/conf/nginx/docker.conf +++ b/conf/nginx/docker.conf @@ -30,4 +30,4 @@ server { proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:1689; } -} \ No newline at end of file +} diff --git a/conf/nginx/kms.conf b/conf/nginx/kms.conf index 50b229e..70f0243 100644 --- a/conf/nginx/kms.conf +++ b/conf/nginx/kms.conf @@ -48,4 +48,4 @@ server { } location /assets {} -} \ No newline at end of file +} diff --git a/conf/vlmcsd.service b/conf/vlmcsd.service index 54f8032..5bd98e9 100644 --- a/conf/vlmcsd.service +++ b/conf/vlmcsd.service @@ -10,4 +10,4 @@ ExecStop=/bin/kill -HUP $MAINPID PrivateTmp=true [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target