134 lines
7.7 KiB
XML
134 lines
7.7 KiB
XML
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Introduction on Save Any Bot</title><link>https://sabot.unv.app/en/</link><description>Recent content in Introduction on Save Any Bot</description><generator>Hugo</generator><language>en</language><atom:link href="https://sabot.unv.app/en/index.xml" rel="self" type="application/rss+xml"/><item><title>Installation and Updates</title><link>https://sabot.unv.app/en/deployment/installation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/deployment/installation/</guid><description><h1 id="installation-and-updates">
|
|
Installation and Updates
|
|
<a class="anchor" href="#installation-and-updates">#</a>
|
|
</h1>
|
|
<h2 id="deploy-from-pre-compiled-binary-recommended">
|
|
Deploy from Pre-compiled Binary (Recommended)
|
|
<a class="anchor" href="#deploy-from-pre-compiled-binary-recommended">#</a>
|
|
</h2>
|
|
<p>Download the binary file for your platform from the <a href="https://github.com/krau/SaveAny-Bot/releases">Release</a> page.</p>
|
|
<p>Create a <code>config.toml</code> file in the extracted directory, refer to the <a href="../configuration">Configuration Guide</a> to edit the configuration file.</p>
|
|
<p>Run:</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>chmod +x saveany-bot
|
|
</span></span><span style="display:flex;"><span>./saveany-bot
|
|
</span></span></code></pre></div><h3 id="daemon">
|
|
Daemon
|
|
<a class="anchor" href="#daemon">#</a>
|
|
</h3>
|
|
<div class="book-tabs">
|
|
|
|
|
|
<input type="radio" class="toggle" name="tabs-daemon" id="tabs-daemon-0" checked="checked" />
|
|
<label for="tabs-daemon-0">systemd (Regular Linux)</label>
|
|
<div class="book-tabs-content markdown-inner">
|
|
|
|
Create a file <code>/etc/systemd/system/saveany-bot.service</code> and write the following content:
|
|
|
|
<pre><code class="language-text">[Unit]
|
|
Description=SaveAnyBot
|
|
After=systemd-user-sessions.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
WorkingDirectory=/yourpath/
|
|
ExecStart=/yourpath/saveany-bot
|
|
Restart=always
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target</code></pre>
|
|
|
|
Enable startup on boot and start the service:
|
|
|
|
<pre><code class="language-text">systemctl enable --now saveany-bot</code></pre>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<input type="radio" class="toggle" name="tabs-daemon" id="tabs-daemon-1" />
|
|
<label for="tabs-daemon-1">procd (OpenWrt)</label>
|
|
<div class="book-tabs-content markdown-inner">
|
|
|
|
<h4>Add Boot Autostart Service</h4>
|
|
|
|
Create a file <code>/etc/init.d/saveanybot</code>, refer to <a href="https://github.com/krau/SaveAny-Bot/blob/main/docs/confs/wrt_init" target="_blank">wrt_init</a> and modify as needed:
|
|
|
|
<pre><code class="language-text">#!/bin/sh /etc/rc.common
|
|
|
|
#This is the OpenWRT init.d script for SaveAnyBot
|
|
|
|
START=99
|
|
STOP=10
|
|
description=&amp;#34;SaveAnyBot&amp;#34;
|
|
|
|
WORKING_DIR=&amp;#34;/mnt/mmc1-1/SaveAnyBot&amp;#34;
|
|
EXEC_PATH=&amp;#34;$WORKING_DIR/saveany-bot&amp;#34;
|
|
start() {
|
|
echo &amp;#34;Starting SaveAnyBot...&amp;#34;
|
|
cd $WORKING_DIR
|
|
$EXEC_PATH &amp;amp;
|
|
}
|
|
stop() {
|
|
echo &amp;#34;Stopping SaveAnyBot...&amp;#34;
|
|
killall saveany-bot
|
|
}
|
|
reload() {
|
|
stop
|
|
start
|
|
}</code></pre>
|
|
|
|
Set permissions:
|
|
|
|
<pre><code class="language-text">chmod &#43;x /etc/init.d/saveanybot</code></pre>
|
|
|
|
Then copy the file to <code>/etc/rc.d</code> and rename it to <code>S99saveanybot</code>, also set permissions:
|
|
|
|
<pre><code class="language-text">chmod &#43;x /etc/rc.d/S99saveanybot</code></pre>
|
|
|
|
<h4>Add Shortcut Commands</h4>
|
|
|
|
Create a file <code>/usr/bin/sabot</code>, refer to <a href="https://github.com/krau/SaveAny-Bot/blob/main/docs/confs/wrt_bin" target="_blank">wrt_bin</a> and modify as needed. Note that the file encoding here only supports ANSI 936.
|
|
|
|
Then set permissions:
|
|
|
|
<pre><code class="language-text">chmod &#43;x /usr/bin/sabot</code></pre>
|
|
|
|
Usage: <code>sudo sabot start|stop|restart|status|enable|disable</code>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<h2 id="deploy-using-docker">
|
|
Deploy Using Docker
|
|
<a class="anchor" href="#deploy-using-docker">#</a>
|
|
</h2>
|
|
<h3 id="docker-compose">
|
|
Docker Compose
|
|
<a class="anchor" href="#docker-compose">#</a>
|
|
</h3>
|
|
<p>Download the <a href="https://github.com/krau/SaveAny-Bot/blob/main/docker-compose.yml">docker-compose.yml</a> file, create a new <code>config.toml</code> file in the same directory, refer to <a href="https://github.com/krau/SaveAny-Bot/blob/main/config.example.toml">config.example.toml</a> to edit the configuration file.</p></description></item><item><title>Storage Configuration</title><link>https://sabot.unv.app/en/deployment/configuration/storages/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/deployment/configuration/storages/</guid><description><h1 id="storage-configuration">
|
|
Storage Configuration
|
|
<a class="anchor" href="#storage-configuration">#</a>
|
|
</h1>
|
|
<p>Please first read the <a href="../">Configuration Guide</a> to understand the basic format of the configuration file.</p>
|
|
<h2 id="alist">
|
|
Alist
|
|
<a class="anchor" href="#alist">#</a>
|
|
</h2>
|
|
<p><code>type=alist</code></p>
|
|
<p>Stream mode is not supported.</p>
|
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-toml" data-lang="toml"><span style="display:flex;"><span><span style="color:#a6e22e">url</span> = <span style="color:#e6db74">&#34;https://alist.example.com&#34;</span> <span style="color:#75715e"># URL of Alist</span>
|
|
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">username</span> = <span style="color:#e6db74">&#34;your_username&#34;</span> <span style="color:#75715e"># Username for Alist</span>
|
|
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">password</span> = <span style="color:#e6db74">&#34;your_password&#34;</span> <span style="color:#75715e"># Password for Alist</span>
|
|
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">base_path</span> = <span style="color:#e6db74">&#34;/path/saveanybot&#34;</span> <span style="color:#75715e"># Base path in Alist, all files will be stored under this path</span>
|
|
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">token_exp</span> = <span style="color:#ae81ff">3600</span> <span style="color:#75715e"># Auto-refresh time for Alist access token, in seconds</span>
|
|
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">token</span> = <span style="color:#e6db74">&#34;your_token&#34;</span>
|
|
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Access token for Alist, optional, if not set, username and password will be used for authentication.</span>
|
|
</span></span><span style="display:flex;"><span><span style="color:#75715e"># When using token authentication, the token cannot be automatically refreshed</span>
|
|
</span></span></code></pre></div><h2 id="local-disk">
|
|
Local Disk
|
|
<a class="anchor" href="#local-disk">#</a>
|
|
</h2>
|
|
<p><code>type=local</code></p></description></item></channel></rss> |