Deployment Guide on Save Any Bothttps://sabot.unv.app/en/deployment/Recent content in Deployment Guide on Save Any BotHugoenInstallation and Updateshttps://sabot.unv.app/en/deployment/installation/Mon, 01 Jan 0001 00:00:00 +0000https://sabot.unv.app/en/deployment/installation/<h1 id="installation-and-updates"> Installation and Updates <a class="anchor" href="#installation-and-updates">#</a> </h1> <h2 id="deploy-from-pre-compiled-files"> Deploy from Pre-compiled Files <a class="anchor" href="#deploy-from-pre-compiled-files">#</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="process-monitoring"> Process Monitoring <a class="anchor" href="#process-monitoring">#</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>