Ddns Go在openwrt的配置与saltstack

==用来替代ddns的作用,配置config-file到/mnt/sda1/config/ddns-go/ddns-go-config.yaml

配置 /etc/init.d/ddns-go

#!/bin/sh /etc/rc.common
# Copyright (C) 2008-2012 OpenWrt.org

START=99
APP=ddns-go
SERVICE_WRITE_PID=1
SERVICE_DAEMONIZE=1

start() {
        service_start /usr/bin/ddns-go -f 30 -c /mnt/sda1/config/ddns-go/ddns-go-config.yaml 
}
stop() {
        service_stop /usr/bin/ddns-go -f 30-c /mnt/sda1/config/ddns-go/ddns-go-config.yaml
}

如果使用saltstack

其实都是salt配置文件存储,然后指定os,再用file.managed模块和cmd.run模块执行脚本,然后再配置安装。

http://static.kancloud.cn/louis1986/saltstack/521789

参见第七章配置管理。

image-20220612223445098

image-20220612223509317

image-20220612223531363