diff --git a/includes/organizr-conf/custom/organizr.conf b/includes/organizr-conf/custom/organizr.conf index 4f024104..a5643b4d 100644 --- a/includes/organizr-conf/custom/organizr.conf +++ b/includes/organizr-conf/custom/organizr.conf @@ -5,6 +5,7 @@ proxy_connect_timeout 240; client_header_timeout 240; client_body_timeout 240; + location / { root /usr/local/www/Organizr; index index.php index.html index.htm index.nginx-debian.html; @@ -17,6 +18,7 @@ location / { include custom/phpblock.conf; #PHP Block } + location /transmission/ { auth_request /auth-0; add_header X-Frame-Options "SAMEORIGIN"; diff --git a/includes/py-kms-conf/py_kms.rc b/includes/py-kms-conf/py_kms.rc new file mode 100644 index 00000000..3509f3dc --- /dev/null +++ b/includes/py-kms-conf/py_kms.rc @@ -0,0 +1,38 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: py_kms +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# py-kms_enable: Set to YES to enable py-kms +# Default: NO +# py-kms_user: The user account used to run the py-kms daemon. +# This is optional, however do not specifically set this to an +# empty string as this will cause the daemon to run as root. +# Default: media +# py-kms_group: The group account used to run the py-kms daemon. +# This is optional, however do not specifically set this to an +# empty string as this will cause the daemon to run with group wheel. +# Default: media +# py-kms_data_dir: Directory where py-kms configuration +# data is stored. + +. /etc/rc.subr +name=py_kms +rcvar=${name}_enable +load_rc_config $name + +: ${py_kms_enable:="NO"} +: ${py_kms_user:="kms"} +: ${py_kms_group:="kms"} +: ${py_kms_data_dir:="/config"} + +command="/usr/local/bin/python3.7" +command_args="/usr/local/share/py-kms/pykms_Server.py 0.0.0.0 1688 -F ${py_kms_data_dir}/py-kms.log etrigan start --etrigan-pid/etrigan.pid" + +run_rc_command "$1" \ No newline at end of file diff --git a/install/kms.sh b/install/kms.sh new file mode 100644 index 00000000..c921b914 --- /dev/null +++ b/install/kms.sh @@ -0,0 +1,13 @@ +echo '{"pkgs":["bash","ca_root_nss","nano","py37-tkinter","py37-pip","py37-sqlite3","git"]}' > /tmp/pkg.json +iocage create -n "kms" -p /tmp/pkg.json -r 11.3-RELEASE interfaces="vnet0:bridge10" ip4_addr="vnet0|192.168.10.43/24" defaultrouter="192.168.10.1" vnet="on" allow_raw_sockets="1" boot="on" +rm /tmp/pkg.json +iocage exec kms mkdir -p /config +iocage fstab -a kms /mnt/tank/apps/kms /config nullfs rw 0 0 +iocage exec kms svn checkout https://github.com/SystemRage/py-kms/trunk/py-kms /usr/local/share/py-kms +iocage exec kms "pw user add kms -c kms -u 666 -d /nonexistent -s /usr/bin/nologin" +iocage exec kms chown -R kms:kms /usr/local/share/py-kms /config +iocage exec kms mkdir /usr/local/etc/rc.d +cp ../includes/py-kms-conf/py_kms.rc /mnt/tank/iocage/jails/kms/root/usr/local/etc/rc.d/py_kms +iocage exec kms chmod u+x /usr/local/etc/rc.d/py_kms +iocage exec kms sysrc "py_kms_enable=YES" +iocage exec kms service py_kms start \ No newline at end of file