2
บริการ Systemd ทำงานโดยไม่ออกจากเครื่อง
ฉันสร้างบริการของตัวเองสำหรับ jekyll และเมื่อฉันเริ่มบริการดูเหมือนว่ามันจะไม่ทำงานเป็นกระบวนการพื้นหลังเพราะฉันถูกบังคับให้ctrl+ cออกจากมัน มันอยู่ในเบื้องหน้าเพราะ - ดู ฉันไม่แน่ใจว่าจะไปรอบ ๆ และทำให้มันทำงานในพื้นหลังได้อย่างไร ความคิดใด ๆ # /etc/systemd/system/jekyll-blog.service [Unit] Description=Start blog jekyll [Service] Type=forking WorkingDirectory=/home/blog ExecStart=/usr/local/bin/jekyll build --watch --incremental -s /home/blog -d /var/www/html/blog & ExecReload=/bin/kill -HUP $MAINPID KillMode=process Restart=on-failure User=root Group=root [Install] WantedBy=multi-user.target
30
systemd