diff options
author | Slack Coder <slackcoder@server.ky> | 2024-10-02 16:49:36 -0500 |
---|---|---|
committer | Slack Coder <slackcoder@server.ky> | 2024-10-02 17:01:48 -0500 |
commit | 2597c03d1555e00dec59830b7de75e7090208e05 (patch) | |
tree | 5642202b4621ea722ee85b322d79bbad17894026 /contrib | |
parent | b81d017b42cc814e603de2b49e4b78362ae73f2a (diff) | |
download | mirror-2597c03d1555e00dec59830b7de75e7090208e05.tar.xz |
config: Use TOML
TOML is simple for users, and it is used in notably projects like
rustlang. It also provides comments!
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/slackbuild/config.json | 6 | ||||
-rw-r--r-- | contrib/slackbuild/doinst.sh | 2 | ||||
-rw-r--r-- | contrib/slackbuild/mirror.SlackBuild | 2 | ||||
-rw-r--r-- | contrib/slackbuild/mirror.toml | 10 | ||||
-rw-r--r-- | contrib/slackbuild/rc.mirror | 2 |
5 files changed, 13 insertions, 9 deletions
diff --git a/contrib/slackbuild/config.json b/contrib/slackbuild/config.json deleted file mode 100644 index f9fe2e9..0000000 --- a/contrib/slackbuild/config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "min-interval": "1h", - "max-interval": "24h", - "mirrors": [ - ] -} diff --git a/contrib/slackbuild/doinst.sh b/contrib/slackbuild/doinst.sh index 7a11ce4..60cac25 100644 --- a/contrib/slackbuild/doinst.sh +++ b/contrib/slackbuild/doinst.sh @@ -40,4 +40,4 @@ fi chown mirror:mirror /var/log/mirror preserve_perms etc/rc.d/rc.mirror.new -preserve_perms etc/mirror/config.json.new +preserve_perms etc/mirror/mirror.toml.new diff --git a/contrib/slackbuild/mirror.SlackBuild b/contrib/slackbuild/mirror.SlackBuild index eccbc1a..66d6234 100644 --- a/contrib/slackbuild/mirror.SlackBuild +++ b/contrib/slackbuild/mirror.SlackBuild @@ -63,7 +63,7 @@ cat "$CWD/doinst.sh" > "$PKG/install/doinst.sh" mkdir -p "$PKG/etc/rc.d" cat "$CWD/rc.mirror" > "$PKG/etc/rc.d/rc.mirror.new" mkdir -p $PKG/etc/mirror -cat "$CWD/config.json" > "$PKG/etc/mirror/config.json.new" +cat "$CWD/mirror.toml" > "$PKG/etc/mirror/mirror.toml.new" mkdir -p "$PKG/var/log/mirror" cd "$PKG" diff --git a/contrib/slackbuild/mirror.toml b/contrib/slackbuild/mirror.toml new file mode 100644 index 0000000..d3522e6 --- /dev/null +++ b/contrib/slackbuild/mirror.toml @@ -0,0 +1,10 @@ +[global] +min-interval = "15s" +max-interval = "1m" + +[[mirrors]] +method = "git" +from = "https://github.com/ytdl-org/youtube-dl" +to = "/home/cypher/Desktop/youtube-dl" +description = "Command-line program to download videos from YouTube.com and other video sites" + diff --git a/contrib/slackbuild/rc.mirror b/contrib/slackbuild/rc.mirror index 81acb9b..df3c72f 100644 --- a/contrib/slackbuild/rc.mirror +++ b/contrib/slackbuild/rc.mirror @@ -20,7 +20,7 @@ start() { --user=mirror \ --pidfiles=/run/mirror \ --output=/var/log/mirror/mirror.log \ - -- mirror -config /etc/mirror/config.json + -- mirror -config /etc/mirror/mirror.toml } stop() { |