Startup script with systemd in Linux

前端 未结 1 656
情书的邮戳
情书的邮戳 2021-02-01 08:48

Can I do This start up service below, there are no errors showing once run, but the server script below does not run!

ln /lib/systemd/aquarium.service aquarium.s         


        
1条回答
  •  孤城傲影
    2021-02-01 09:20

    Try using "Type=forking" and use complete filename.

    [Unit]
    Description=Start aquarium server
    
    [Service]
    WorkingDirectory=/home/root/python/code/aquarium/
    Type=forking
    ExecStart=/bin/bash server.sh start
    KillMode=process
    
    [Install]
    WantedBy=multi-user.target
    

    if it not work, post output of this command:

    # journalctl -u aquarium.service
    

    0 讨论(0)
提交回复
热议问题