This commit is contained in:
New Future
2019-03-30 14:13:05 +08:00
parent e46ef4f567
commit 6a1aad7702
5 changed files with 60 additions and 10 deletions
+14 -5
View File
@@ -41,14 +41,17 @@ jobs:
displayName: 'Install dependencies'
- script: pip install pyinstaller
displayName: 'pyinstaller'
name: 'pyinstaller'
- script: build.cmd
displayName: 'build'
name: 'build'
- bash: dist/ddns.exe || test -e "config.json"
name: run
- script: copy release/*.bat dist/ && copy release/*.md dist/
name: 'CopyRlease'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: './dist/'
@@ -75,13 +78,19 @@ jobs:
displayName: 'Install dependencies'
- script: pip install pyinstaller
displayName: 'pyinstaller'
name: 'pyinstaller'
- script: ./build.cmd
displayName: 'build'
name: 'build'
- script: ./dist/ddns || test -e "config.json"
displayName: 'test'
name: 'test'
- script: cp dist/ddns dist/ddns-osx
name: 'CopyDist'
- script: cp release/*.sh dist/ && cp release/*.md dist/
name: 'CopyRlease'
- task: PublishBuildArtifacts@1
inputs:
-5
View File
@@ -1,5 +0,0 @@
* windows 下载 `ddns.exe`
* Ubuntu 下载 `ddns`
* Mac 下载 `ddns-mac.zip`解压运行
* 其他下载 源码 python 运行
+27
View File
@@ -0,0 +1,27 @@
* windows 下载 `ddns.exe`
* Ubuntu 下载 `ddns`
* Mac 下载 `ddns-mac.zip`解压运行
* 其他下载 源码 python 运行
## Ubunutu
* ddns 运行
```sh
curl https://github.com/NewFuture/DDNS/releases/download/v2.4.2/ddns -#SLo ddns && chmod +x ddns
```
* linux 创建定时任务(当前文件夹)
```sh
curl -sSL https://github.com/NewFuture/DDNS/releases/download/v2.4.2/create-task.sh | bash
```
## windows
* 下载 `ddns.exe` 运行
* 定时任务 下载 `create-task.bat` 相同目录
## Mac
```sh
curl https://github.com/NewFuture/DDNS/releases/download/v2.4.2/ddns-mac.zip -#SLo ddns && chmod +x ddns
```
+12
View File
@@ -0,0 +1,12 @@
@ECHO OFF
REM https://msdn.microsoft.com/zh-cn/library/windows/desktop/bb736357(v=vs.85).aspx
SET RUNCMD="%~dp0ddns.exe" -c "%~dp0config.json" >> "%~dp0run.log"
SET RUN_USER=%USERNAME%
WHOAMI /GROUPS | FIND "12288" > NUL && SET RUN_USER="SYSTEM"
ECHO Create task run as %RUN_USER%
schtasks /Create /SC MINUTE /MO 5 /TR "%RUNCMD%" /TN "DDNS" /F /RU "%RUN_USER%"
PAUSE
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
RUN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";
CMD="\"$RUN_DIR/ddns\" -c \"$RUN_DIR/config.json\" >> \"$RUN_DIR/run.log\"";
echo "*/5 * * * * root '$CMD'" > /etc/cron.d/ddns;
/etc/init.d/cron reload;