Linux 创建服务

2023-02-07  本文已影响0人  承诺一时的华丽

配置 Systemd (Linux)

sudo mkdir -p /etc/gorse/
sudo mkdir -p /var/log/gorse/
sudo mkdir -p /var/lib/gorse/
sudo mv config.toml /etc/gorse/
[Unit]
Description=Gorse, an open source recommender system service written in Go.
After=network.target

[Service]
Type=simple
Restart=always
ExecStart=/usr/local/bin/gorse-in-one -c /etc/gorse/config.toml \
    --log-path /var/log/gorse/gorse.log \
    --cache-path /var/lib/gorse/gorse.data

[Install]
WantedBy=multi-user.target

sudo systemctl daemon-reload
sudo systemctl enable gorse
sudo systemctl start gorse
systemctl status gorse
上一篇下一篇

猜你喜欢

热点阅读