start service in background

Olsenius

Cadet
Joined
Aug 28, 2017
Messages
4
Hi,

I want to setup haproxy in a jail to load balance requests to different jails. After installing (pkg install) and configuring haproxy i start it with "service haproxy start". After starting the service haproxy starts in my shell and i have to close it with Ctrl-C to get my terminal back. My perhaps simple question is how to get the service to run in the background?
 

Olsenius

Cadet
Joined
Aug 28, 2017
Messages
4
Enabled the service and restarted the jail. Restart hangs on starting services.

Code:
root@NAS:/mnt/storage/users/andreas # iocage restart haproxy
* Stopping haproxy
  + Running prestop OK
  + Stopping services OK
  + Tearing down VNET OK
  + Removing devfs_ruleset: 10 OK
  + Removing jail process OK
  + Running poststop OK
* Starting haproxy
  + Started OK
  + Configuring VNET OK
  + DHCP Address: 192.168.1.72/24
  ---HANGS HERE---


Code:
root@haproxy:~ # sysrc haproxy_enable=NO
haproxy_enable: YES -> NO
root@haproxy:~ # exit
logout
root@NAS:/mnt/storage/users/andreas # iocage restart haproxy
* Stopping haproxy
  + Running prestop OK
  + Stopping services OK
  + Tearing down VNET OK
  + Removing devfs_ruleset: 10 OK
  + Removing jail process OK
  + Running poststop OK
* Starting haproxy
  + Started OK
  + Configuring VNET OK
  + DHCP Address: 192.168.1.72/24
  + Starting services OK
root@NAS:/mnt/storage/users/andreas #


Might this be a problem with the haproxy package? I have tried package haproxy-2.0.1 and haproxy19-1.9.8.
 
Top