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



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

    /usr/local/bin/cd_proxyd
    [code]#!bash
    exec mono /opt/cd_proxyd/cd_proxyd.exe --daemon[/code]

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

    I ran [code]systemctl daemon-reload[/code] and [code]systemctl enable cd_proxyd[/code] but at boot I still get this status:
    [code]● cd_proxyd.service - CloneDeploy Proxy DHCP
    Loaded: loaded (/etc/systemd/system/cd_proxyd.service; static; vendor preset: enabled)
    Active: inactive (dead)
    [/code]

    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?



  • [code]ExecStart=/usr/bin/mono /usr/local/bin/cd_proxyd.exe --daemon[/code]



  • I did the following, daemon-reloaded, enabled, still nothing:
    [code][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
    [/code]
    (I tried both with and without the commented lines)



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



  • [code]-- No entries --[/code]
    Note that my [code]cd_proxyd.exe[/code] is not at [code]/usr/local/bin/[/code] but rather at [code]/opt/cd_proxyd/[/code].



  • I added the following and now it works:
    [code][Install]
    WantedBy=multi-user.target[/code]