How to add cd_proxyd.exe as a service on startup?

  1. 8 months ago

    I tried to add cd_proxyd to startup via systemd by creating:

    /usr/local/bin/cd_proxyd

    #!bash
    exec mono /opt/cd_proxyd/cd_proxyd.exe --daemon

    /etc/systemd/system/cd_proxyd.service

    [Unit]
    Description=CloneDeploy Proxy DHCP
    After=network.target tftpd-hpa.service apache2.service
    [Service]
    ExecStart=/usr/local/bin/cd_proxyd
    Type=simple

    I ran systemctl daemon-reload and systemctl enable cd_proxyd but at boot I still get this status:

    ‚óŹ cd_proxyd.service - CloneDeploy Proxy DHCP
       Loaded: loaded (/etc/systemd/system/cd_proxyd.service; static; vendor preset: enabled)
       Active: inactive (dead)

    I also tried running `mono-service /opt/cd_proxyd/cd_proxyd.exe --daemon` and `mono-service /usr/local/bin/cd_proxyd` but it seems that cd_proxyd doesn't run.

    Any suggestions?

    I added the following and now it works:

    [Install]
    WantedBy=multi-user.target
  2. clonedeploy

    21 Mar 2017 Administrator
    ExecStart=/usr/bin/mono /usr/local/bin/cd_proxyd.exe --daemon
  3. I did the following, daemon-reloaded, enabled, still nothing:

    [Unit]
    Description=CloneDeploy Proxy DHCP
    #Requires=network.target tftpd-hpa.service apache2.service
    #After=network.target tftpd-hpa.service apache2.service
    
    [Service]
    ExecStart=/usr/bin/mono /opt/cd_proxyd/cd_proxyd.exe --daemon
    Type=simple

    (I tried both with and without the commented lines)

  4. clonedeploy

    22 Mar 2017 Administrator

    That's strange, the example I provided is working for me. Is there anything in the log?
    journalctl -u cd_proxyd.service

  5. -- No entries --

    Note that my cd_proxyd.exe is not at /usr/local/bin/ but rather at /opt/cd_proxyd/.

  6. I added the following and now it works:

    [Install]
    WantedBy=multi-user.target
 

or Sign Up to reply!