Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Autostarting software with systemd

    Reply
    iltsu | # 1 | 2014-01-02, 01:44 | Report

    I installed btsync to my phone, it runs fine but can't get it starting with systemd.
    Code:
    [root@localhost system]# cat btsync.service
    [Unit]
    Description=BTSync
    After=network.target
    
    [Service]
    User=nemo
    ExecStart=/home/nemo/btsync
    
    [Install]
    WantedBy=multi-user.target
    systemctl start btsync.service doesn't give any error.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by iltsu; 2014-01-02 at 02:51.

     
    Gigadoc2 | # 2 | 2014-01-09, 00:23 | Report

    What does systemctl status btsync.service say?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    kimmoli | # 3 | 2014-01-09, 10:29 | Report

    To autostart at boot
    Code:
    systemctl enable btsync.service

    Edit | Forward | Quote | Quick Reply | Thanks

     
    iltsu | # 4 | 2014-01-12, 15:52 | Report

    Originally Posted by kimmoli View Post
    To autostart at boot
    Code:
    systemctl enable btsync.service
    Well, it doesn't still work. I think there is something wrong with that script.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    fLegmatik | # 5 | 2014-01-25, 16:17 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
vBulletin® Version 3.8.8
Normal Logout