Ticket #49264: move_root.key_patch.diff
File move_root.key_patch.diff, 2.0 KB (added by danielluke (Daniel J. Luke), 9 years ago) |
---|
-
Portfile
5 5 6 6 name unbound 7 7 version 1.5.6 8 revision 1 8 9 categories net 9 10 license BSD 10 11 maintainers snc … … 34 35 sha256 ad3823f5895f59da9e408ea273fcf81d8a76914c18864fba256d7f140b83e404 35 36 36 37 configure.args-append --with-pidfile=${prefix}/var/run/${name}/${name}.pid \ 37 --with-rootkey-file=${prefix}/ var/run/${name}/root.key38 --with-rootkey-file=${prefix}/etc/${name}/root.key 38 39 39 40 if {${os.major} == 10} { 40 41 configure.compiler macports-clang-3.4 … … 53 54 move ${destroot}${prefix}/etc/${name}/${name}.conf ${destroot}${prefix}/etc/${name}/${name}.conf-dist 54 55 touch ${destroot}${prefix}/var/run/${name}/${name}.pid 55 56 file attributes ${destroot}${prefix}/var/run/${name}/${name}.pid -owner ${unbounduser} -group ${unboundgroup} 57 file attributes ${destroot}${prefix}/etc/${name} -group ${unboundgroup} -permissions 0775 56 58 } 57 59 58 60 post-activate { 59 system "${prefix}/sbin/unbound-anchor -a \"${prefix}/ var/run/${name}/root.key\" || :"61 system "${prefix}/sbin/unbound-anchor -a \"${prefix}/etc/${name}/root.key\" || :" 60 62 file attributes ${prefix}/var/run/${name}/root.key -owner ${unbounduser} -group ${unboundgroup} 61 63 } 62 64 … … 63 65 # Make it run on boot 64 66 startupitem.create yes 65 67 startupitem.name unbound 66 startupitem.start "${prefix}/sbin/unbound-anchor -a ${prefix}/ var/run/${name}/root.key || : && chown ${unbounduser}:${unboundgroup} ${prefix}/var/run/${name}/root.key && ${prefix}/sbin/unbound"68 startupitem.start "${prefix}/sbin/unbound-anchor -a ${prefix}/etc/${name}/root.key || : && chown ${unbounduser}:${unboundgroup} ${prefix}/etc/${name}/root.key && ${prefix}/sbin/unbound" 67 69 startupitem.stop "/bin/kill \$(cat ${prefix}/var/run/${name}/unbound.pid)" 68 70 69 71 livecheck.type regex