Coder Social home page Coder Social logo

Comments (7)

yufeng94 avatar yufeng94 commented on June 30, 2024

这个不需要吧,linux可以利用systemd工具完成服务自启。
在 /etc/systemd/system/ 目录下新建tank.service文件,把以下内容放进去,用systemctl命令就可以控制云盘的启动关闭以及开机自启了。

[Unit]
Description=tank
After=network.target
Wants=network.target

[Service]
Type=simple
PIDFile=/var/run/tank.pid
ExecStart=/root/tank-2.0.0/service/startup.sh
ExecStop=/root/tank-2.0.0/service/shutdown.sh
ExecReload=/bin/kill -HUP $MAINPID
RestartPreventExitStatus=23
Restart=always

[Install]
WantedBy=default.target

from tank.

zicla avatar zicla commented on June 30, 2024

这个不需要吧,linux可以利用systemd工具完成服务自启。
在 /etc/systemd/system/ 目录下新建tank.service文件,把以下内容放进去,用systemctl命令就可以控制云盘的启动关闭以及开机自启了。

[Unit]
Description=tank
After=network.target
Wants=network.target

[Service]
Type=simple
PIDFile=/var/run/tank.pid
ExecStart=/root/tank-2.0.0/service/startup.sh
ExecStop=/root/tank-2.0.0/service/shutdown.sh
ExecReload=/bin/kill -HUP $MAINPID
RestartPreventExitStatus=23
Restart=always

[Install]
WantedBy=default.target

对,就是这个service,到时候我放到文档中,用户可以自行添加。

from tank.

zicla avatar zicla commented on June 30, 2024

开机启动的方法已经添加在了文档中,可以参考这里: https://tank-doc.eyeblue.cn/zh/basic/install.html#linux

from tank.

XiaoPika avatar XiaoPika commented on June 30, 2024

@zicla 能不能提供windows的后台运行和开机自启的功能?借助第三方工具不容易实现

from tank.

XiaoPika avatar XiaoPika commented on June 30, 2024

https://natapp.cn/article/windows_service
借助这个网站提供的 nssm 工具完成

from tank.

zicla avatar zicla commented on June 30, 2024

https://natapp.cn/article/windows_service
借助这个网站提供的 nssm 工具完成

@XiaoPika 最近两天我把windows的后台运行和开机启动方法补充到文档中。

from tank.

XiaoPika avatar XiaoPika commented on June 30, 2024

@XiaoPika 最近两天我把windows的后台运行和开机启动方法补充到文档中。

感谢

from tank.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.