View Single Post
Posts: 6 | Thanked: 3 times | Joined on Mar 2010 @ Russia
#5
Code:
[root@localhost system]# systemctl status btsync.service
btsync.service - BitTorrent Sync application
          Loaded: loaded (/lib/systemd/system/btsync.service; disabled)
          Active: active (running) since Sat, 25 Jan 2014 21:55:40 +0600; 1s ago
         Process: 9964 ExecStart=/usr/local/bin/btsync --config %h/.config/btsync/btsync.config (code=exited, status=0/SUCCESS)
        Main PID: 9971 (btsync)
          CGroup: name=systemd:/system/btsync.service
                  └ 9971 /usr/local/bin/btsync --config /home/nemo/.config/btsync/btsync.config

[root@localhost system]# cat /lib/systemd/system/btsync.service 
[Unit]
Description=BitTorrent Sync application
After=network.target

[Service]
Type=forking
User=nemo
ExecStart=/usr/local/bin/btsync --config %h/.config/btsync/btsync.config
PIDFile=%h/.config/btsync/sync.pid

[Install]
WantedBy=multi-user.target
PIDFile must be the same as pid_file in btsync.config or storage_path in btsync.config must be "/home/nemo/.config/btsync".
# systemctl enable btsync.service
also works fine.