Created
March 27, 2019 18:02
-
-
Save shutingrz/3d11c38808b1d56ef980fa69b83983b4 to your computer and use it in GitHub Desktop.
こんな感じでiocage使ってる。exec_poststartはなぜかiocageでjail起動してもrc.dが動いてくれないからworkaround
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
JNAME= | |
IP4ADDR= | |
IP6ADDR= | |
iocage create -n $JNAME -r 12.0-RELEASE \ | |
ip4_addr="vtnet1|192.168.254.$IP4ADDR/24" \ | |
defaultrouter=192.168.254.1 \ | |
resolver="nameserver 192.168.254.1" \ | |
allow_raw_sockets=1 \ | |
boot=on \ | |
ip6_addr="vtnet1|2001:470:24:8b:1::$IP6ADDR" \ | |
defaultrouter6="vtnet1|2001:470:24:8b:1::1" \ | |
exec_poststart="/usr/bin/env iocage exec $JNAME '/usr/sbin/service -R'" | |
#lets encryptの証明書を共有する | |
mkdir -p /iocage/jails/$JNAME/root/usr/local/etc/lets-ssl | |
iocage fstab $JNAME -a "/usr/local/etc/lets-ssl /usr/local/etc/lets-ssl nullfs rw 0 0" | |
iocage restart $JNAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment