mirror of
https://github.com/NewFuture/DDNS.git
synced 2026-10-19 16:15:45 +00:00
release #45
This commit is contained in:
+14
-5
@@ -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:
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
* windows 下载 `ddns.exe`
|
||||
* Ubuntu 下载 `ddns`
|
||||
* Mac 下载 `ddns-mac.zip`解压运行
|
||||
* 其他下载 源码 python 运行
|
||||
@@ -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
|
||||
```
|
||||
@@ -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
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user