github.com/yaling888/clash@v1.53.0/examples/daemon/linux/clash.service (about)

     1  ############################################################################
     2  # Install:
     3  # curl -LO https://github.com/yaling888/clash/raw/plus-pro/examples/daemon/linux/clash.service
     4  # cp clash.service /etc/systemd/system/
     5  # systemctl enable clash.service
     6  # systemctl start clash
     7  # systemctl status clash -l --no-pager
     8  # ps aux | grep clash
     9  # journalctl -ex
    10  #
    11  # Uninstall:
    12  # systemctl stop clash.service
    13  # systemctl disable clash.service
    14  # rm /etc/systemd/system/clash.service
    15  #
    16  # executable file: /usr/local/bin/clash
    17  # configuration folder: /etc/clash/
    18  ############################################################################
    19  [Unit]
    20  Description=Clash Daemon
    21  After=syslog.target network-online.target remote-fs.target nss-lookup.target
    22  Wants=network-online.target
    23  
    24  [Service]
    25  Type=simple
    26  Restart=always
    27  LimitNOFILE=524288
    28  ExecStart=/usr/local/bin/clash -d /etc/clash/
    29  
    30  [Install]
    31  WantedBy=multi-user.target