From 52509f9912eda15b1ed0a256bd019ffdd4276645 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Sat, 25 Apr 2020 15:41:39 +0200 Subject: [PATCH] Jail-Specific config.yml (#61) * - Move pkgs to per-jail config file - Remove pkgs from main example-config file - edit gitignore to include jail config files * prototype for loop to grab jail configs * update *arr pkgs --- .gitignore | 2 +- config.yml.example | 30 ------------------------------ jailman.sh | 1 + jails/bitwarden/config.yml | 2 ++ jails/influxdb/config.yml | 2 ++ jails/jackett/config.yml | 2 ++ jails/kms/config.yml | 2 ++ jails/lidarr/config.yml | 2 ++ jails/mariadb/config.yml | 2 ++ jails/nextcloud/config.yml | 2 ++ jails/organizr/config.yml | 2 ++ jails/plex/config.yml | 2 ++ jails/radarr/config.yml | 2 ++ jails/sonarr/config.yml | 2 ++ jails/tautulli/config.yml | 2 ++ jails/transmission/config.yml | 2 ++ 16 files changed, 28 insertions(+), 31 deletions(-) create mode 100644 jails/bitwarden/config.yml create mode 100644 jails/influxdb/config.yml create mode 100644 jails/jackett/config.yml create mode 100644 jails/kms/config.yml create mode 100644 jails/lidarr/config.yml create mode 100644 jails/mariadb/config.yml create mode 100644 jails/nextcloud/config.yml create mode 100644 jails/organizr/config.yml create mode 100644 jails/plex/config.yml create mode 100644 jails/radarr/config.yml create mode 100644 jails/sonarr/config.yml create mode 100644 jails/tautulli/config.yml create mode 100644 jails/transmission/config.yml diff --git a/.gitignore b/.gitignore index e9abc7f6..9fc8384e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -config.yml \ No newline at end of file +/config.yml \ No newline at end of file diff --git a/config.yml.example b/config.yml.example index a9fdb1f7..d648f631 100644 --- a/config.yml.example +++ b/config.yml.example @@ -28,42 +28,15 @@ example: example # Jail specific pkgs. # Please use standard space delimited pkg install syntax. pkgs: mono - -jackett: jackett - pkgs: mono - -radarr: radarr - pkgs: mono mediainfo sqlite3 libgdiplus - -sonarr: sonarr - pkgs: mono mediainfo sqlite3 - -lidarr: lidarr - pkgs: mono mediainfo sqlite3 - -transmission: transmission - pkgs: bash unzip unrar transmission plex: plex plexpass: false - pkgs: plexmediaserver - -tautulli: tautulli - pkgs: python2 py27-sqlite3 py27-openssl git - -organizr: organizr - pkgs: nginx php72 php72-filter php72-curl php72-hash php72-json php72-openssl php72-pdo php72-pdo_sqlite php72-session php72-simplexml php72-sqlite3 php72-zip git - -kms: kms - pkgs: bash py37-tkinter py37-pip py37-sqlite3 git - nextcloud: nextcloud ip4_addr: 192.168.1.99/24 gateway: 192.168.1.1 time_zone: Europe/Amsterdam host_name: cloud.example.com - pkgs: nano sudo redis php73-ctype gnupg php73-dom php73-gd php73-iconv php73-json php73-mbstring php73-posix php73-simplexml php73-xmlreader php73-xmlwriter php73-zip php73-zlib php73-hash php73-xml php73 php73-pecl-redis php73-session php73-wddx php73-xsl php73-filter php73-pecl-APCu php73-curl php73-fileinfo php73-bz2 php73-intl php73-openssl php73-ldap php73-ftp php73-imap php73-exif php73-gmp php73-pecl-memcache php73-pecl-imagick perl5 p5-Locale-gettext help2man texinfo m4 autoconf database: mariadb standalone_cert: 0 selfsigned_cert: 0 @@ -81,14 +54,12 @@ nextcloud: nextcloud mariadb: mariadb ip4_addr: 192.168.1.98/24 gateway: 192.168.1.1 - pkgs: mariadb104-server git php74-session php74-xml php74-ctype php74-openssl php74-filter php74-gd php74-json php74-mysqli php74-mbstring php74-zlib php74-zip php74-bz2 phpMyAdmin5-php74 php74-pdo_mysql php74-mysqli phpMyAdmin5-php74-5.0.1 db_root_password: ReplaceThisWithYourOwnRootPAssword host_name: mariadb.local.example bitwarden: bitwarden ip4_addr: 192.168.1.97/24 gateway: 192.168.1.1 - pkgs: sqlite3 nginx git sudo vim-tiny bash node npm python27-2.7.17_1 mariadb104-client db_password: "YourDBPasswordHerePLEASE" type: mariadb admin_token: "PUTYOURADMINTOKENHEREANDREMOVETHIS" @@ -96,5 +67,4 @@ bitwarden: bitwarden influxdb: influxdb ip4_addr: 192.168.1.250/24 gateway: 192.168.1.1 - pkgs: influxdb database: influxdb diff --git a/jailman.sh b/jailman.sh index c20c433b..d7ee700b 100755 --- a/jailman.sh +++ b/jailman.sh @@ -85,6 +85,7 @@ while getopts ":i:r:u:d:g:h" opt done # Parse the Config YAML +for configpath in ${SCRIPT_DIR}/jails/*/config.yml; do ! eval $(parse_yaml ${configpath}); done eval $(parse_yaml config.yml) # Check and Execute requested jail destructions diff --git a/jails/bitwarden/config.yml b/jails/bitwarden/config.yml new file mode 100644 index 00000000..6214896e --- /dev/null +++ b/jails/bitwarden/config.yml @@ -0,0 +1,2 @@ +bitwarden: bitwarden + pkgs: sqlite3 nginx git sudo vim-tiny bash node npm python27-2.7.17_1 mariadb104-client \ No newline at end of file diff --git a/jails/influxdb/config.yml b/jails/influxdb/config.yml new file mode 100644 index 00000000..2ced3a1c --- /dev/null +++ b/jails/influxdb/config.yml @@ -0,0 +1,2 @@ +influxdb: influxdb + pkgs: influxdb \ No newline at end of file diff --git a/jails/jackett/config.yml b/jails/jackett/config.yml new file mode 100644 index 00000000..01cd737f --- /dev/null +++ b/jails/jackett/config.yml @@ -0,0 +1,2 @@ +jackett: jackett + pkgs: mono \ No newline at end of file diff --git a/jails/kms/config.yml b/jails/kms/config.yml new file mode 100644 index 00000000..ca31811d --- /dev/null +++ b/jails/kms/config.yml @@ -0,0 +1,2 @@ +kms: kms + pkgs: bash py37-tkinter py37-pip py37-sqlite3 git \ No newline at end of file diff --git a/jails/lidarr/config.yml b/jails/lidarr/config.yml new file mode 100644 index 00000000..c9bc00a2 --- /dev/null +++ b/jails/lidarr/config.yml @@ -0,0 +1,2 @@ +lidarr: lidarr + pkgs: mono mediainfo sqlite3 \ No newline at end of file diff --git a/jails/mariadb/config.yml b/jails/mariadb/config.yml new file mode 100644 index 00000000..bbe68e55 --- /dev/null +++ b/jails/mariadb/config.yml @@ -0,0 +1,2 @@ +mariadb: mariadb + pkgs: mariadb104-server git php74-session php74-xml php74-ctype php74-openssl php74-filter php74-gd php74-json php74-mysqli php74-mbstring php74-zlib php74-zip php74-bz2 phpMyAdmin5-php74 php74-pdo_mysql php74-mysqli phpMyAdmin5-php74-5.0.1 diff --git a/jails/nextcloud/config.yml b/jails/nextcloud/config.yml new file mode 100644 index 00000000..77618d02 --- /dev/null +++ b/jails/nextcloud/config.yml @@ -0,0 +1,2 @@ +nextcloud: nextcloud + pkgs: nano sudo redis php73-ctype gnupg php73-dom php73-gd php73-iconv php73-json php73-mbstring php73-posix php73-simplexml php73-xmlreader php73-xmlwriter php73-zip php73-zlib php73-hash php73-xml php73 php73-pecl-redis php73-session php73-wddx php73-xsl php73-filter php73-pecl-APCu php73-curl php73-fileinfo php73-bz2 php73-intl php73-openssl php73-ldap php73-ftp php73-imap php73-exif php73-gmp php73-pecl-memcache php73-pecl-imagick perl5 p5-Locale-gettext help2man texinfo m4 autoconf \ No newline at end of file diff --git a/jails/organizr/config.yml b/jails/organizr/config.yml new file mode 100644 index 00000000..887c1645 --- /dev/null +++ b/jails/organizr/config.yml @@ -0,0 +1,2 @@ +organizr: organizr + pkgs: nginx php72 php72-filter php72-curl php72-hash php72-json php72-openssl php72-pdo php72-pdo_sqlite php72-session php72-simplexml php72-sqlite3 php72-zip git \ No newline at end of file diff --git a/jails/plex/config.yml b/jails/plex/config.yml new file mode 100644 index 00000000..8206391a --- /dev/null +++ b/jails/plex/config.yml @@ -0,0 +1,2 @@ +plex: plex + pkgs: plexmediaserver \ No newline at end of file diff --git a/jails/radarr/config.yml b/jails/radarr/config.yml new file mode 100644 index 00000000..789ec723 --- /dev/null +++ b/jails/radarr/config.yml @@ -0,0 +1,2 @@ +radarr: radarr + pkgs: mono mediainfo sqlite3 libgdiplus \ No newline at end of file diff --git a/jails/sonarr/config.yml b/jails/sonarr/config.yml new file mode 100644 index 00000000..1197e640 --- /dev/null +++ b/jails/sonarr/config.yml @@ -0,0 +1,2 @@ +sonarr: sonarr + pkgs: mono mediainfo sqlite3 \ No newline at end of file diff --git a/jails/tautulli/config.yml b/jails/tautulli/config.yml new file mode 100644 index 00000000..34256990 --- /dev/null +++ b/jails/tautulli/config.yml @@ -0,0 +1,2 @@ +tautulli: tautulli + pkgs: python2 py27-sqlite3 py27-openssl git \ No newline at end of file diff --git a/jails/transmission/config.yml b/jails/transmission/config.yml new file mode 100644 index 00000000..efec5ece --- /dev/null +++ b/jails/transmission/config.yml @@ -0,0 +1,2 @@ +transmission: transmission + pkgs: bash unzip unrar transmission \ No newline at end of file