Apple 打包 Golang WebDav 制作 pkg 安装包
安装 Packages
准备打包文件
# Server related settings address: 0.0.0.0 port: 8888 auth: true tls: false cert: cert.pem key: key.pem prefix: / users: - username: admin password: admin modify: true scope: /Library/Zhxlp/WebDav/data<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <!-- Label唯一的标识 --> <key>Label</key> <string>com.zhxlp.webdav</string> <!-- 指定要运行的脚本 --> <key>ProgramArguments</key> <array> <string>/Library/Zhxlp/WebDav/webdav</string> <string>-c</string> <string>/Library/Zhxlp/WebDav/config.yaml</string> </array> <!-- 开机时是否运行 --> <key>RunAtLoad</key> <true/> <!-- 程序是否需要一直运行 --> <key>KeepAlive</key> <true/> <!-- 工作目录 <key>WorkingDirectory</key> <string>/Library/Zhxlp/WebDav/</string> 调试模式 <key>Debug</key> <true/> 标准输出日志 <key>StandardOutPath</key> <string>/tmp/com.zhxlp.webdav.log</string> 错误输出日志 <key>StandardErrorPath</key> <string>/tmp/com.zhxlp.webdav.log</string> --> </dict> </plist>#!/usr/bin/env bash echo "Running pre script" if [[ -f "/Library/LaunchDaemons/com.zhxlp.webdav.plist" ]];then launchctl unload /Library/LaunchDaemons/com.zhxlp.webdav.plist fi exit 0#!/usr/bin/env bash echo "Running post script" if [[ -f "/Library/Zhxlp/WebDav/webdav" && -f "/Library/LaunchDaemons/com.zhxlp.webdav.plist" ]];then launchctl load /Library/LaunchDaemons/com.zhxlp.webdav.plist fi exit 0
创建打包工程
签名

公正

参考
最后更新于





















