Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

开机启动问题 #75

Closed
findthewayxf opened this issue Oct 29, 2020 · 1 comment
Closed

开机启动问题 #75

findthewayxf opened this issue Oct 29, 2020 · 1 comment

Comments

@findthewayxf
Copy link

能否推荐开机启动的最优解。

cat << EOF >/lib/systemd/system/rssbot.service
[Unit]
Description=rssbot service
After=network.target

[Service]
User=root
Type=simple
ExecStart=/bin/bash /root/rssbot/bot-up
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
EOF

bot-up

#!/bin/bash
cd /root/rssbot
nohup ./flowerss-bot &
@findthewayxf
Copy link
Author

cat > /lib/systemd/system/rssbot.service <<EOF
[Unit]
Description=The Rssbot Service
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/flowerss-bot -c /root/rssbot/config.yml
ExecStop=/bin/killall flowerss-bot
Restart=on-failure

[Install]
WantedBy=multi-user.target
EOF

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant