News for hackers. Stuff that matters.
Re:You should try FreeBSD (2014) by toast0 on Friday November 20, 2015 @01:45PM (#10602990)
I have a piece of software running in jails on our servers, I wrote a script to assemble the jail (although this could just be expanding a tar file, and copying in the service configuration file), and add to jail.conf, (maybe add to rc.conf.local if you want to autostart). I didn't need to sysctl, or rctl. I also wrote a small rc file (that just calls /usr/sbin/jail -c name to start, and jail -r name to stop)

in jail.conf i just have

  stud {
    path = "/usr/local/jails/jail_name";
    ip4 = "inherit";
    host.hostname = "jail_name.example.net";
    securelevel = 4;
    devfs_ruleset = 10;
    exec.start = "/bin/service --config=/etc/service.conf";
    mount.devfs;
    exec.system_jail_user;
    exec.jail_user=jail_name;
    exec.poststart="/usr/local/bin/jail_ipfw";
  }
(ok, i also setup a devfs rule, because i had issues with built in ones and various patch levels of FreeBSD -- and my service needs access to /dev/random)

The only non-obvious thing is you need /libexec/ld-elf.so.1 in order to run dynamically linked libraries.

There are no comments on this comment yet.