initial ombi setup
This commit is contained in:
parent
65bd3805c9
commit
fbe7ce58ab
49
includes/ombi-conf/ombi.rc
Normal file
49
includes/ombi-conf/ombi.rc
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# $FreeBSD$
|
||||||
|
#
|
||||||
|
# PROVIDE: ombi
|
||||||
|
# REQUIRE: LOGIN
|
||||||
|
# KEYWORD: shutdown
|
||||||
|
#
|
||||||
|
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
||||||
|
# to enable this service:
|
||||||
|
#
|
||||||
|
# ombi_enable (bool): Set to NO by default.
|
||||||
|
# Set it to YES to enable it.
|
||||||
|
# ombi_user: The user account ombi daemon runs as what
|
||||||
|
# you want it to be. It uses 'ombi' user by
|
||||||
|
# default. Do not sets it as empty or it will run
|
||||||
|
# as root.
|
||||||
|
# ombi_group: The group account ombi daemon runs as what
|
||||||
|
# you want it to be. It uses 'ombi' group by
|
||||||
|
# default. Do not sets it as empty or it will run
|
||||||
|
# as wheel.
|
||||||
|
# ombi_data_dir: Directory where ombi configuration
|
||||||
|
# data is stored.
|
||||||
|
# Default: /usr/local/share/ombi
|
||||||
|
|
||||||
|
. /etc/rc.subr
|
||||||
|
|
||||||
|
name=ombi
|
||||||
|
rcvar=ombi_enable
|
||||||
|
load_rc_config ${name}
|
||||||
|
|
||||||
|
: ${ombi_enable:=NO}
|
||||||
|
: ${ombi_user:=ombi}
|
||||||
|
: ${ombi_group:=ombi}
|
||||||
|
: ${ombi_data_dir:="/config"}
|
||||||
|
|
||||||
|
procname="/usr/local/bin/mono"
|
||||||
|
command="/usr/sbin/daemon"
|
||||||
|
command_args="-f ${procname} /usr/local/share/ombi/Ombi.exe"
|
||||||
|
|
||||||
|
start_precmd=ombi_precmd
|
||||||
|
ombi_precmd() {
|
||||||
|
if [ ! -d ${ombi_data_dir} ];
|
||||||
|
then install -d -o ${ombi_user} -g ${ombi_group} ${ombi_data_dir}
|
||||||
|
fi
|
||||||
|
export XDG_CONFIG_HOME=${ombi_data_dir}
|
||||||
|
}
|
||||||
|
|
||||||
|
run_rc_command "$1"
|
@ -115,10 +115,10 @@ location /tautulli/ {
|
|||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /ombi {
|
location /ombi/ {
|
||||||
auth_request /auth-4;
|
auth_request /auth-4;
|
||||||
add_header X-Frame-Options "SAMEORIGIN";
|
add_header X-Frame-Options "SAMEORIGIN";
|
||||||
proxy_pass https://127.0.0.1:5000/ombi/;
|
proxy_pass https://192.168.31.27:3579/;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection keep-alive;
|
proxy_set_header Connection keep-alive;
|
||||||
|
28
install/ombi.sh
Normal file
28
install/ombi.sh
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
echo '{"pkgs":["mono","ca_root_nss","unzip","sqlite3","nano"]}' > /tmp/pkg.json
|
||||||
|
iocage create -n "ombi" -p /tmp/pkg.json -r 11.3-RELEASE interfaces="vnet0:bridge31" ip4_addr="vnet0|192.168.31.27/24" defaultrouter="192.168.31.1" vnet="on" allow_raw_sockets="1" boot="on"
|
||||||
|
rm /tmp/pkg.json
|
||||||
|
iocage fstab -a ombi /mnt/tank/apps/ombi /config nullfs rw 0 0
|
||||||
|
iocage exec ombi ln -s /usr/local/bin/mono /usr/bin/mono
|
||||||
|
iocage exec ombi "fetch https://github.com/tidusjar/Ombi/releases/download/v2.2.1/Ombi.zip -o /usr/local/share"
|
||||||
|
iocage exec ombi "unzip -d /usr/local/share /usr/local/share/Ombi.zip"
|
||||||
|
iocage exec ombi mv /usr/local/share/Release /usr/local/share/ombi
|
||||||
|
iocage exec ombi rm /usr/local/share/Ombi.zip
|
||||||
|
|
||||||
|
if [ -f "/config/Ombi.sqlite" ];
|
||||||
|
then
|
||||||
|
echo "Ombi.sqlite exist."
|
||||||
|
else
|
||||||
|
echo "Ombi.sqlite does not exist, creating..." >&2
|
||||||
|
iocage exec ombi sqlite3 /config/Ombi.sqlite "create table aTable(field1 int); drop table aTable;"
|
||||||
|
iocage exec ombi mkdir -p /config/Backups
|
||||||
|
fi
|
||||||
|
|
||||||
|
iocage exec ombi ln -s /config/Ombi.sqlite /usr/local/share/ombi/Ombi.sqlite
|
||||||
|
iocage exec ombi ln -s /config/Backups /usr/local/share/ombi/Backups
|
||||||
|
iocage exec ombi "pw user add ombi -c ombi -u 819 -d /nonexistent -s /usr/bin/nologin"
|
||||||
|
iocage exec ombi chown -R ombi:ombi /usr/local/share/ombi /config
|
||||||
|
iocage exec ombi mkdir /usr/local/etc/rc.d
|
||||||
|
cp ../includes/ombi-conf/ombi.rc /mnt/tank/iocage/jails/ombi/root/usr/local/etc/rc.d/ombi
|
||||||
|
iocage exec ombi chmod u+x /usr/local/etc/rc.d/ombi
|
||||||
|
iocage exec ombi sysrc ombi_enable=YES
|
||||||
|
iocage exec ombi service ombi start
|
Loading…
Reference in New Issue
Block a user