aethernal-agent 0.2.0 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/COPYING +674 -0
  3. data/Gemfile.lock +38 -33
  4. data/README.md +3 -32
  5. data/Vagrantfile +10 -2
  6. data/aethernal-agent.gemspec +4 -1
  7. data/bin/install-aa +121 -0
  8. data/bin/run-aa-for-test +1 -1
  9. data/exe/aa-cli +7 -0
  10. data/lib/aethernal_agent.rb +10 -0
  11. data/lib/aethernal_agent/apache/apache.rb +8 -5
  12. data/lib/aethernal_agent/apache/templates/aa-default.conf +2 -0
  13. data/lib/aethernal_agent/apache/templates/aa-user.conf.erb +2 -0
  14. data/lib/aethernal_agent/app.rb +82 -22
  15. data/lib/aethernal_agent/apt.rb +17 -6
  16. data/lib/aethernal_agent/cli/core.rb +11 -0
  17. data/lib/aethernal_agent/cli/services.rb +56 -0
  18. data/lib/aethernal_agent/docker/container_settings.rb +33 -0
  19. data/lib/aethernal_agent/docker/env.rb +33 -0
  20. data/lib/aethernal_agent/docker/port_binding.rb +32 -0
  21. data/lib/aethernal_agent/docker/volume.rb +28 -0
  22. data/lib/aethernal_agent/filesystem.rb +2 -1
  23. data/lib/aethernal_agent/loader.rb +3 -3
  24. data/lib/aethernal_agent/operation.rb +1 -1
  25. data/lib/aethernal_agent/plugins/bazarr/bazarr.rb +57 -0
  26. data/lib/aethernal_agent/plugins/bazarr/files/bazarr.service +16 -0
  27. data/lib/aethernal_agent/plugins/bazarr/manifest.yml +64 -0
  28. data/lib/aethernal_agent/plugins/bazarr/meta/bazarr.png +0 -0
  29. data/lib/aethernal_agent/plugins/bazarr/templates/bazarr.apache.conf.erb +5 -0
  30. data/lib/aethernal_agent/plugins/bazarr/templates/config.ini.erb +135 -0
  31. data/lib/aethernal_agent/plugins/cardigann/cardigann.rb +45 -0
  32. data/lib/aethernal_agent/plugins/cardigann/files/cardigann.service +13 -0
  33. data/lib/aethernal_agent/plugins/cardigann/manifest.yml +36 -0
  34. data/lib/aethernal_agent/plugins/cardigann/meta/cardigann.png +0 -0
  35. data/lib/aethernal_agent/plugins/cardigann/templates/cardigann.apache.conf.erb +6 -0
  36. data/lib/aethernal_agent/plugins/cardigann/templates/config.json.erb +7 -0
  37. data/lib/aethernal_agent/plugins/couchpotato/couchpotato.rb +45 -0
  38. data/lib/aethernal_agent/plugins/couchpotato/files/couchpotato.service +13 -0
  39. data/lib/aethernal_agent/plugins/couchpotato/manifest.yml +37 -0
  40. data/lib/aethernal_agent/plugins/couchpotato/meta/couchpotato.png +0 -0
  41. data/lib/aethernal_agent/plugins/couchpotato/templates/couchpotato.apache.conf.erb +4 -0
  42. data/lib/aethernal_agent/plugins/couchpotato/templates/settings.conf.erb +585 -0
  43. data/lib/aethernal_agent/plugins/deluge/deluge.rb +5 -0
  44. data/lib/aethernal_agent/plugins/deluge/manifest.yml +2 -2
  45. data/lib/aethernal_agent/plugins/deluge/templates/core.conf.erb +1 -1
  46. data/lib/aethernal_agent/plugins/deluge/templates/deluge-web.service.erb +1 -1
  47. data/lib/aethernal_agent/plugins/deluge/templates/deluge.apache.conf.erb +0 -1
  48. data/lib/aethernal_agent/plugins/deluge/templates/deluged.service.erb +1 -1
  49. data/lib/aethernal_agent/plugins/deluge/templates/ltconfig.conf.erb +21 -0
  50. data/lib/aethernal_agent/plugins/filebrowser/manifest.yml +1 -1
  51. data/lib/aethernal_agent/plugins/gitea/manifest.yml +1 -1
  52. data/lib/aethernal_agent/plugins/jackett/files/jackett.service +15 -0
  53. data/lib/aethernal_agent/plugins/jackett/jackett.rb +49 -0
  54. data/lib/aethernal_agent/plugins/jackett/manifest.yml +54 -0
  55. data/lib/aethernal_agent/plugins/jackett/meta/jackett.png +0 -0
  56. data/lib/aethernal_agent/plugins/jackett/templates/ServerConfig.json.erb +8 -0
  57. data/lib/aethernal_agent/plugins/jackett/templates/jackett.apache.conf.erb +5 -0
  58. data/lib/aethernal_agent/plugins/jdownloader/files/jdownloader.service +13 -0
  59. data/lib/aethernal_agent/plugins/jdownloader/jdownloader.rb +38 -0
  60. data/lib/aethernal_agent/plugins/jdownloader/manifest.yml +53 -0
  61. data/lib/aethernal_agent/plugins/jdownloader/meta/jdownloader.png +0 -0
  62. data/lib/aethernal_agent/plugins/jdownloader/templates/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json.erb +5 -0
  63. data/lib/aethernal_agent/plugins/medusa/files/medusa.service +13 -0
  64. data/lib/aethernal_agent/plugins/medusa/manifest.yml +54 -0
  65. data/lib/aethernal_agent/plugins/medusa/medusa.rb +47 -0
  66. data/lib/aethernal_agent/plugins/medusa/meta/medusa.png +0 -0
  67. data/lib/aethernal_agent/plugins/medusa/templates/config.ini.erb +1308 -0
  68. data/lib/aethernal_agent/plugins/medusa/templates/medusa.apache.conf.erb +12 -0
  69. data/lib/aethernal_agent/plugins/nextcloud/manifest.yml +54 -0
  70. data/lib/aethernal_agent/plugins/nextcloud/meta/nextcloud.png +0 -0
  71. data/lib/aethernal_agent/plugins/nextcloud/nextcloud.rb +44 -0
  72. data/lib/aethernal_agent/plugins/nextcloud/templates/nextcloud.apache.conf.erb +4 -0
  73. data/lib/aethernal_agent/plugins/nzbget/files/nzbget.service +13 -0
  74. data/lib/aethernal_agent/plugins/nzbget/manifest.yml +54 -0
  75. data/lib/aethernal_agent/plugins/nzbget/meta/nzbget.png +0 -0
  76. data/lib/aethernal_agent/plugins/nzbget/nzbget.rb +44 -0
  77. data/lib/aethernal_agent/plugins/nzbget/templates/nzbget.apache.conf.erb +5 -0
  78. data/lib/aethernal_agent/plugins/nzbget/templates/nzbget.conf.erb +1508 -0
  79. data/lib/aethernal_agent/plugins/olaris/manifest.yml +1 -1
  80. data/lib/aethernal_agent/plugins/ombi/manifest.yml +5 -2
  81. data/lib/aethernal_agent/plugins/ombi/ombi.rb +59 -22
  82. data/lib/aethernal_agent/plugins/ombi/templates/ombi.apache.conf.erb +3 -4
  83. data/lib/aethernal_agent/plugins/ombi/templates/ombi.service.erb +2 -2
  84. data/lib/aethernal_agent/plugins/plex-docker/manifest.yml +74 -0
  85. data/lib/aethernal_agent/plugins/plex-docker/meta/plex.png +0 -0
  86. data/lib/aethernal_agent/plugins/plex-docker/plex_docker.rb +39 -0
  87. data/lib/aethernal_agent/plugins/plex-docker/templates/Preferences.xml.erb +2 -0
  88. data/lib/aethernal_agent/plugins/plex-docker/templates/plex_docker.apache.conf.erb +21 -0
  89. data/lib/aethernal_agent/plugins/plex-docker/templates/plex_docker.service.erb +10 -0
  90. data/lib/aethernal_agent/plugins/plex/files/plex.service +1 -1
  91. data/lib/aethernal_agent/plugins/plex/manifest.yml +6 -5
  92. data/lib/aethernal_agent/plugins/plex/plex.rb +2 -4
  93. data/lib/aethernal_agent/plugins/plex/templates/Preferences.xml.erb +1 -1
  94. data/lib/aethernal_agent/plugins/plex/templates/plex.apache.conf.erb +21 -0
  95. data/lib/aethernal_agent/plugins/portainer/manifest.yml +50 -0
  96. data/lib/aethernal_agent/plugins/portainer/meta/portainer.png +0 -0
  97. data/lib/aethernal_agent/plugins/portainer/portainer.rb +38 -0
  98. data/lib/aethernal_agent/plugins/portainer/templates/portainer.apache.conf.erb +7 -0
  99. data/lib/aethernal_agent/plugins/portainer/templates/portainer.service.erb +10 -0
  100. data/lib/aethernal_agent/plugins/radarr/files/radarr.service +2 -2
  101. data/lib/aethernal_agent/plugins/radarr/manifest.yml +7 -13
  102. data/lib/aethernal_agent/plugins/radarr/radarr.rb +24 -18
  103. data/lib/aethernal_agent/plugins/radarr/templates/radarr.apache.conf.erb +3 -4
  104. data/lib/aethernal_agent/plugins/resilio_docker/manifest.yml +59 -0
  105. data/lib/aethernal_agent/plugins/resilio_docker/meta/resilio.png +0 -0
  106. data/lib/aethernal_agent/plugins/resilio_docker/resilio_docker.rb +29 -0
  107. data/lib/aethernal_agent/plugins/resilio_docker/templates/resilio_docker.apache.conf.erb +11 -0
  108. data/lib/aethernal_agent/plugins/resilio_docker/templates/resilio_docker.conf.erb +38 -0
  109. data/lib/aethernal_agent/plugins/resilio_docker/templates/resilio_docker.service.erb +10 -0
  110. data/lib/aethernal_agent/plugins/rutorrent/manifest.yml +84 -0
  111. data/lib/aethernal_agent/plugins/rutorrent/meta/rtorrent.png +0 -0
  112. data/lib/aethernal_agent/plugins/rutorrent/rutorrent.rb +41 -0
  113. data/lib/aethernal_agent/plugins/rutorrent/templates/rtorrent.rc.erb +69 -0
  114. data/lib/aethernal_agent/plugins/rutorrent/templates/rutorrent.apache.conf.erb +13 -0
  115. data/lib/aethernal_agent/plugins/rutorrent/templates/rutorrent.service.erb +10 -0
  116. data/lib/aethernal_agent/plugins/sabnzbd/files/sabnzbd.service +13 -0
  117. data/lib/aethernal_agent/plugins/sabnzbd/manifest.yml +43 -0
  118. data/lib/aethernal_agent/plugins/sabnzbd/meta/sabnzbd.png +0 -0
  119. data/lib/aethernal_agent/plugins/sabnzbd/sabnzbd.rb +47 -0
  120. data/lib/aethernal_agent/plugins/sabnzbd/templates/sabnzbd.apache.conf.erb +4 -0
  121. data/lib/aethernal_agent/plugins/sabnzbd/templates/sabnzbd.ini.erb +188 -0
  122. data/lib/aethernal_agent/plugins/sickchill/files/sickchill.service +13 -0
  123. data/lib/aethernal_agent/plugins/sickchill/manifest.yml +58 -0
  124. data/lib/aethernal_agent/plugins/sickchill/meta/sickchill.png +0 -0
  125. data/lib/aethernal_agent/plugins/sickchill/sickchill.rb +49 -0
  126. data/lib/aethernal_agent/plugins/sickchill/templates/config.ini.erb +1078 -0
  127. data/lib/aethernal_agent/plugins/sickchill/templates/sickchill.apache.conf.erb +4 -0
  128. data/lib/aethernal_agent/plugins/sonarr/files/sonarr.service +1 -1
  129. data/lib/aethernal_agent/plugins/sonarr/manifest.yml +3 -2
  130. data/lib/aethernal_agent/plugins/sonarr/templates/sonarr.apache.conf.erb +3 -4
  131. data/lib/aethernal_agent/plugins/syncthing/files/syncthing.service +18 -0
  132. data/lib/aethernal_agent/plugins/syncthing/manifest.yml +38 -0
  133. data/lib/aethernal_agent/plugins/syncthing/meta/syncthing.png +0 -0
  134. data/lib/aethernal_agent/plugins/syncthing/syncthing.rb +33 -0
  135. data/lib/aethernal_agent/plugins/syncthing/templates/config.xml.erb +56 -0
  136. data/lib/aethernal_agent/plugins/syncthing/templates/syncthing.apache.conf.erb +7 -0
  137. data/lib/aethernal_agent/plugins/tautulli/files/tautulli.service +13 -0
  138. data/lib/aethernal_agent/plugins/tautulli/manifest.yml +40 -0
  139. data/lib/aethernal_agent/plugins/tautulli/meta/tautulli.png +0 -0
  140. data/lib/aethernal_agent/plugins/tautulli/tautulli.rb +45 -0
  141. data/lib/aethernal_agent/plugins/tautulli/templates/config.ini.erb +222 -0
  142. data/lib/aethernal_agent/plugins/tautulli/templates/tautulli.apache.conf.erb +5 -0
  143. data/lib/aethernal_agent/plugins/vnc/manifest.yml +3 -2
  144. data/lib/aethernal_agent/systemd.rb +19 -13
  145. data/lib/aethernal_agent/utils.rb +85 -6
  146. data/lib/aethernal_agent/version.rb +1 -1
  147. data/lib/aethernal_agent/webserver/api.rb +1 -1
  148. data/lib/aethernal_agent/webserver/core.rb +1 -1
  149. metadata +154 -7
@@ -0,0 +1,4 @@
1
+ <Location "/sickchill">
2
+ ProxyPass http://127.0.0.1:<%= @port %>/sickchill
3
+ ProxyPassReverse http://127.0.0.1:<%= @port %>/sickchill
4
+ </Location>
@@ -10,4 +10,4 @@ KillMode=process
10
10
  Restart=on-failure
11
11
 
12
12
  [Install]
13
- WantedBy=multi-user.target
13
+ WantedBy=default.target
@@ -1,7 +1,7 @@
1
1
  name: Sonarr
2
2
  script_name: sonarr.rb
3
3
  version: 0.1
4
- required_aethernal_agent_version: "~> 0.1.0"
4
+ required_aethernal_agent_version: ">= 0.2.0"
5
5
  description: Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
6
6
  installation_type: local_install
7
7
  configuration_type: multi_user
@@ -57,10 +57,11 @@ package:
57
57
  auto_extract: true
58
58
  always_latest: false
59
59
  apt:
60
- "18.04":
60
+ "1804":
61
61
  add_sources:
62
62
  mono_stable:
63
63
  source_url: "deb https://download.mono-project.com/repo/ubuntu stable-bionic main"
64
64
  key_id: "3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
65
65
  packages:
66
66
  - mono-devel
67
+ - mediainfo
@@ -1,6 +1,5 @@
1
- Redirect "/sonarr" "/sonarr/app"
2
- <Location /sonarr/>
3
- ProxyPass http://localhost:<%= @port %>
4
- ProxyPassReverse http://localhost:<%= @port %>
1
+ <Location /sonarr>
2
+ ProxyPass http://localhost:<%= @port %>/sonarr
3
+ ProxyPassReverse http://localhost:<%= @port %>/sonarr
5
4
  Require all granted
6
5
  </Location>
@@ -0,0 +1,18 @@
1
+ [Unit]
2
+ Description=Syncthing - Open Source Continuous File Synchronization
3
+ Documentation=man:syncthing(1)
4
+
5
+ [Service]
6
+ ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0
7
+ Restart=on-failure
8
+ RestartSec=5
9
+ SuccessExitStatus=3 4
10
+ RestartForceExitStatus=3 4
11
+
12
+ # Hardening
13
+ SystemCallArchitectures=native
14
+ MemoryDenyWriteExecute=true
15
+ NoNewPrivileges=true
16
+
17
+ [Install]
18
+ WantedBy=default.target
@@ -0,0 +1,38 @@
1
+ name: Syncthing
2
+ script_name: syncthing.rb
3
+ version: 0.1
4
+ required_aethernal_agent_version: ">= 0.2.0"
5
+ description: Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes.
6
+ installation_type: global_install
7
+ configuration_type: multi_user
8
+ plain_name: syncthing
9
+ built_in_updater: false
10
+ icon:
11
+ name: syncthing.png
12
+ sha256sum: 9e19cfbcb23ab1280adb991db6bf4d0b16a3a33a3dcae4a147b2305f42293bfe
13
+ apache_configuration: syncthing.apache.conf.erb
14
+ services:
15
+ - syncthing
16
+ actions:
17
+ configure_app_user:
18
+ password:
19
+ required: false
20
+ auto_generate: true
21
+ port:
22
+ auto_generate_port: true
23
+ user:
24
+ required: true
25
+ linux_user: true
26
+ display_values:
27
+ - user
28
+ - password
29
+ estimated_size_mb: 12
30
+ package:
31
+ apt:
32
+ "1804":
33
+ add_sources:
34
+ syncthing:
35
+ source_url: "deb https://apt.syncthing.net/ syncthing stable"
36
+ key_url: "https://syncthing.net/release-key.txt "
37
+ packages:
38
+ - syncthing
@@ -0,0 +1,33 @@
1
+ class AethernalAgent::Syncthing < AethernalAgent::App
2
+ def initialize(options = {})
3
+ super(options)
4
+ end
5
+
6
+ def install_packages(options = {})
7
+ super(options)
8
+ end
9
+
10
+ def uninstall_packages(options = {})
11
+ super(options)
12
+ end
13
+
14
+ def remove_app_user(options = {})
15
+ uninstall_packages(options)
16
+ super(options) do
17
+ directory( home_folder_path(".config/syncthing"), owner: self.user, action: :delete)
18
+ end
19
+ end
20
+
21
+ def configure_app_user(options = {})
22
+ install_packages(options)
23
+
24
+ super(options) do |opts|
25
+ directory( home_folder_path(".config/syncthing"), owner: self.user)
26
+ write_template(template_path('config.xml.erb'),
27
+ home_folder_path(".config/syncthing/config.xml"),
28
+ opts.merge(hash: BCrypt::Password.create(opts[:password], cost: 4).to_s, api_key: SecureRandom.hex(32)),
29
+ {owner: self.user})
30
+ end
31
+ end
32
+
33
+ end
@@ -0,0 +1,56 @@
1
+ <configuration version="30">
2
+ <gui enabled="true" tls="false" debugging="false">
3
+ <address>[::]:<%= @port %></address>
4
+ <user><%= @user %></user>
5
+ <password><%= @hash %></password>
6
+ <apikey><%= @api_key %></apikey>
7
+ <theme>default</theme>
8
+ </gui>
9
+ <ldap></ldap>
10
+ <options>
11
+ <listenAddress>default</listenAddress>
12
+ <globalAnnounceServer>default</globalAnnounceServer>
13
+ <globalAnnounceEnabled>true</globalAnnounceEnabled>
14
+ <localAnnounceEnabled>true</localAnnounceEnabled>
15
+ <localAnnouncePort>21027</localAnnouncePort>
16
+ <localAnnounceMCAddr>[ff12::8384]:21027</localAnnounceMCAddr>
17
+ <maxSendKbps>0</maxSendKbps>
18
+ <maxRecvKbps>0</maxRecvKbps>
19
+ <reconnectionIntervalS>60</reconnectionIntervalS>
20
+ <relaysEnabled>true</relaysEnabled>
21
+ <relayReconnectIntervalM>10</relayReconnectIntervalM>
22
+ <startBrowser>false</startBrowser>
23
+ <natEnabled>true</natEnabled>
24
+ <natLeaseMinutes>60</natLeaseMinutes>
25
+ <natRenewalMinutes>30</natRenewalMinutes>
26
+ <natTimeoutSeconds>10</natTimeoutSeconds>
27
+ <urAccepted>-1</urAccepted>
28
+ <urSeen>3</urSeen>
29
+ <urUniqueID></urUniqueID>
30
+ <urURL>https://data.syncthing.net/newdata</urURL>
31
+ <urPostInsecurely>false</urPostInsecurely>
32
+ <urInitialDelayS>1800</urInitialDelayS>
33
+ <restartOnWakeup>true</restartOnWakeup>
34
+ <autoUpgradeIntervalH>12</autoUpgradeIntervalH>
35
+ <upgradeToPreReleases>false</upgradeToPreReleases>
36
+ <keepTemporariesH>24</keepTemporariesH>
37
+ <cacheIgnoredFiles>false</cacheIgnoredFiles>
38
+ <progressUpdateIntervalS>5</progressUpdateIntervalS>
39
+ <limitBandwidthInLan>false</limitBandwidthInLan>
40
+ <minHomeDiskFree unit="%">1</minHomeDiskFree>
41
+ <releasesURL>https://upgrades.syncthing.net/meta.json</releasesURL>
42
+ <overwriteRemoteDeviceNamesOnConnect>false</overwriteRemoteDeviceNamesOnConnect>
43
+ <tempIndexMinBlocks>10</tempIndexMinBlocks>
44
+ <trafficClass>0</trafficClass>
45
+ <defaultFolderPath>~</defaultFolderPath>
46
+ <setLowPriority>true</setLowPriority>
47
+ <maxFolderConcurrency>0</maxFolderConcurrency>
48
+ <crashReportingURL>https://crash.syncthing.net/newcrash</crashReportingURL>
49
+ <crashReportingEnabled>true</crashReportingEnabled>
50
+ <stunKeepaliveStartS>180</stunKeepaliveStartS>
51
+ <stunKeepaliveMinS>20</stunKeepaliveMinS>
52
+ <stunServer>default</stunServer>
53
+ <databaseTuning>auto</databaseTuning>
54
+ <maxConcurrentIncomingRequestKiB>0</maxConcurrentIncomingRequestKiB>
55
+ </options>
56
+ </configuration>
@@ -0,0 +1,7 @@
1
+ Redirect "/syncthing" "/syncthing/"
2
+ <Location /syncthing/>
3
+ ProxyPass http://127.0.0.1:<%= @port %>/
4
+ ProxyPassReverse http://127.0.0.1:<%= @port %>/
5
+ Require all granted
6
+ </Location>
7
+
@@ -0,0 +1,13 @@
1
+ [Unit]
2
+ Description=Tautulli
3
+ After=syslog.target network.target
4
+
5
+ [Service]
6
+ Type=simple
7
+ ExecStart=%h/apps/tautulli/Tautulli.py --config=%h/.config/tautulli/config.ini --datadir=%h/.config/tautulli
8
+ TimeoutStopSec=20
9
+ KillMode=process
10
+ Restart=on-failure
11
+
12
+ [Install]
13
+ WantedBy=default.target
@@ -0,0 +1,40 @@
1
+ name: Tautulli
2
+ script_name: tautulli.rb
3
+ version: 0.1
4
+ required_aethernal_agent_version: ">= 0.2.0"
5
+ description: A monitoring and tracking tool for Plex Media Server, formerly Plexpy.
6
+ installation_type: global_install
7
+ configuration_type: multi_user
8
+ plain_name: tautulli
9
+ built_in_updater: false
10
+ icon:
11
+ name: tautulli.png
12
+ sha256sum: 8c79ebfd44003156cd4ae5032d4be10f3fc0a8c894fe3adf5d59865d2ff2da38
13
+ apache_configuration: tautulli.apache.conf.erb
14
+ services:
15
+ - tautulli
16
+ actions:
17
+ configure_app_user:
18
+ password:
19
+ required: false
20
+ auto_generate: true
21
+ port:
22
+ auto_generate_port: true
23
+ user:
24
+ required: true
25
+ linux_user: true
26
+ display_values:
27
+ - user
28
+ - password
29
+ estimated_size_mb: 12
30
+ package:
31
+ folder_name: 'tautulli'
32
+ git:
33
+ url: 'https://github.com/tautulli/tautulli'
34
+ apt:
35
+ "1804":
36
+ packages:
37
+ - python
38
+ - python-pip
39
+ - python-setuptools
40
+ - python-pkg-resources
@@ -0,0 +1,45 @@
1
+ class AethernalAgent::Tautulli < AethernalAgent::App
2
+ def initialize(options = {})
3
+ super(options)
4
+ end
5
+
6
+ def install_packages(options = {})
7
+ remove_app_user
8
+ super(options)
9
+ directory(app_path, owner: self.user)
10
+ directory(tautulli_config_path, owner: self.user)
11
+ end
12
+
13
+ def remove_app_user(options = {})
14
+ super(options) do |opts|
15
+ directory(home_folder_path("/apps/tautulli"), action: :delete)
16
+ directory(home_folder_path("/.config/tautulli"), action: :delete)
17
+ end
18
+ end
19
+
20
+ def configure_app_user(options = {})
21
+ self.install_packages(options)
22
+
23
+ super(options) do |opts|
24
+ @vars = {
25
+ port: opts['port'],
26
+ tautulli_config_path: tautulli_config_path,
27
+ password: opts['password'],
28
+ user: self.user}
29
+
30
+ write_template(template_path('config.ini.erb'),
31
+ tautulli_config_path('config.ini'),
32
+ @vars,
33
+ {owner: self.user})
34
+ end
35
+
36
+ return create_return_args(@vars)
37
+ end
38
+
39
+ protected
40
+
41
+ def tautulli_config_path(path ="/")
42
+ File.join(home_folder_path(".config/tautulli"), path)
43
+ end
44
+
45
+ end
@@ -0,0 +1,222 @@
1
+ [Growl]
2
+ growl_enabled = 0
3
+ growl_on_play = 0
4
+ growl_on_buffer = 0
5
+ growl_on_pause = 0
6
+ growl_host = ""
7
+ growl_on_resume = 0
8
+ growl_password = ""
9
+ growl_on_stop = 0
10
+ growl_on_watched = 0
11
+ [PMS]
12
+ pms_use_bif = 0
13
+ pms_uuid = 294aa1630d334a799708a8c6cfec97ed
14
+ pms_url = ""
15
+ pms_logs_folder = ""
16
+ pms_token = ""
17
+ pms_port = 32400
18
+ pms_is_remote = 1
19
+ pms_identifier = ""
20
+ pms_ip = 127.0.0.1
21
+ [Monitoring]
22
+ movie_notify_enable = 0
23
+ notify_on_stop_body_text = {user} ({player}) has stopped {title}.
24
+ notify_on_resume_body_text = {user} ({player}) has resumed {title}.
25
+ notify_on_pause_body_text = {user} ({player}) has paused {title}.
26
+ buffer_wait = 900
27
+ movie_notify_on_pause = 0
28
+ music_notify_enable = 0
29
+ notify_on_watched_subject_text = PlexPy ({server_name})
30
+ notify_on_watched_body_text = {user} ({player}) has watched {title}.
31
+ music_notify_on_pause = 0
32
+ notify_on_buffer_body_text = {user} ({player}) is buffering {title}.
33
+ tv_notify_on_stop = 0
34
+ music_logging_enable = 0
35
+ notify_on_stop_subject_text = PlexPy ({server_name})
36
+ movie_notify_on_stop = 0
37
+ notify_on_start_body_text = {user} ({player}) started playing {title}.
38
+ notify_watched_percent = 85
39
+ tv_notify_enable = 0
40
+ buffer_threshold = 3
41
+ notify_consecutive = 1
42
+ refresh_users_interval = 12
43
+ monitoring_use_websocket = 0
44
+ notify_on_start_subject_text = PlexPy ({server_name})
45
+ movie_notify_on_start = 1
46
+ monitoring_interval = 60
47
+ tv_notify_on_pause = 0
48
+ refresh_users_on_startup = 1
49
+ tv_notify_on_start = 1
50
+ video_logging_enable = 1
51
+ notify_on_resume_subject_text = PlexPy ({server_name})
52
+ music_notify_on_stop = 0
53
+ logging_ignore_interval = 120
54
+ music_notify_on_start = 1
55
+ notify_on_pause_subject_text = PlexPy ({server_name})
56
+ notify_on_buffer_subject_text = PlexPy ({server_name})
57
+ [Boxcar]
58
+ boxcar_sound = ""
59
+ boxcar_on_watched = 0
60
+ boxcar_on_buffer = 0
61
+ boxcar_on_stop = 0
62
+ boxcar_on_pause = 0
63
+ boxcar_on_play = 0
64
+ boxcar_on_resume = 0
65
+ boxcar_enabled = 0
66
+ boxcar_token = ""
67
+ [PushBullet]
68
+ pushbullet_on_play = 0
69
+ pushbullet_channel_tag = ""
70
+ pushbullet_deviceid = ""
71
+ pushbullet_apikey = ""
72
+ pushbullet_on_resume = 0
73
+ pushbullet_on_buffer = 0
74
+ pushbullet_on_pause = 0
75
+ pushbullet_on_stop = 0
76
+ pushbullet_enabled = 0
77
+ pushbullet_on_watched = 0
78
+ [NMA]
79
+ nma_priority = 0
80
+ nma_on_watched = 0
81
+ nma_on_stop = 0
82
+ nma_on_play = 0
83
+ nma_on_resume = 0
84
+ nma_apikey = ""
85
+ nma_on_buffer = 0
86
+ nma_enabled = 0
87
+ nma_on_pause = 0
88
+ [Advanced]
89
+ verify_ssl_cert = 1
90
+ journal_mode = wal
91
+ cache_sizemb = 32
92
+ [Email]
93
+ email_on_pause = 0
94
+ email_smtp_password = ""
95
+ email_tls = 0
96
+ email_smtp_port = 25
97
+ email_on_watched = 0
98
+ email_smtp_server = ""
99
+ email_enabled = 0
100
+ email_on_resume = 0
101
+ email_smtp_user = ""
102
+ email_on_stop = 0
103
+ email_on_buffer = 0
104
+ email_to = ""
105
+ email_from = ""
106
+ email_on_play = 0
107
+ [PlexWatch]
108
+ grouping_user_history = 0
109
+ plexwatch_database = ""
110
+ grouping_global_history = 0
111
+ grouping_charts = 0
112
+ [OSX_Notify]
113
+ osx_notify_on_buffer = 0
114
+ osx_notify_on_stop = 0
115
+ osx_notify_enabled = 0
116
+ osx_notify_on_watched = 0
117
+ osx_notify_on_pause = 0
118
+ osx_notify_app = /Applications/PlexPy
119
+ osx_notify_on_play = 0
120
+ osx_notify_on_resume = 0
121
+ [Pushover]
122
+ pushover_enabled = 0
123
+ pushover_on_watched = 0
124
+ pushover_on_buffer = 0
125
+ pushover_on_pause = 0
126
+ pushover_on_stop = 0
127
+ pushover_apitoken = ""
128
+ pushover_on_play = 0
129
+ pushover_keys = ""
130
+ pushover_priority = 0
131
+ pushover_on_resume = 0
132
+ pushover_sound = ""
133
+ [Twitter]
134
+ twitter_on_resume = 0
135
+ twitter_enabled = 0
136
+ twitter_username = ""
137
+ twitter_on_stop = 0
138
+ twitter_on_buffer = 0
139
+ twitter_on_watched = 0
140
+ twitter_password = ""
141
+ twitter_on_pause = 0
142
+ twitter_prefix = PlexPy
143
+ twitter_on_play = 0
144
+ [Pushalot]
145
+ pushalot_enabled = 0
146
+ pushalot_on_watched = 0
147
+ pushalot_on_play = 0
148
+ pushalot_on_pause = 0
149
+ pushalot_on_stop = 0
150
+ pushalot_apikey = ""
151
+ pushalot_on_buffer = 0
152
+ pushalot_on_resume = 0
153
+ [Prowl]
154
+ prowl_on_pause = 0
155
+ prowl_enabled = 0
156
+ prowl_priority = 0
157
+ prowl_on_watched = 0
158
+ prowl_keys = ""
159
+ prowl_on_buffer = 0
160
+ prowl_on_play = 0
161
+ prowl_on_resume = 0
162
+ prowl_on_stop = 0
163
+ [General]
164
+ freeze_db = 0
165
+ http_proxy = 1
166
+ ip_logging_enable = 0
167
+ launch_browser = 1
168
+ http_username = "<%= @user %>"
169
+ do_not_override_git_branch = 0
170
+ home_stats_length = 30
171
+ http_host = 0.0.0.0
172
+ http_root = /tautulli
173
+ first_run_complete = 1
174
+ enable_https = 0
175
+ check_github = 1
176
+ api_enabled = 0
177
+ config_version = 0
178
+ check_github_interval = 360
179
+ group_history_tables = 0
180
+ http_password = "<%= @password %>"
181
+ home_stats_count = 5
182
+ cleanup_files = 0
183
+ check_github_on_startup = 1
184
+ http_port = <%= @port %>
185
+ log_dir = <%= @tautulli_config_path %>/logs
186
+ update_db_interval = 24
187
+ interface = default
188
+ pms_ssl = 0
189
+ git_path = ""
190
+ home_stats_cards = "watch_statistics, top_tv, popular_tv, top_movies, popular_movies, top_music, popular_music, top_users, top_platforms, last_watched"
191
+ time_format = HH:mm
192
+ cache_dir = <%= @tautulli_config_path %>/cache
193
+ https_cert = <%= @tautulli_config_path %>/server.crt
194
+ api_key = ""
195
+ date_format = YYYY-MM-DD
196
+ home_stats_type = 0
197
+ https_key = <%= @tautulli_config_path %>/server.key
198
+ git_user = drzoidberg33
199
+ home_library_cards = library_statistics_first
200
+ git_branch = master
201
+ [Plex]
202
+ plex_client_host = ""
203
+ plex_on_play = 0
204
+ plex_on_stop = 0
205
+ plex_on_resume = 0
206
+ plex_on_watched = 0
207
+ plex_on_buffer = 0
208
+ plex_on_pause = 0
209
+ plex_enabled = 0
210
+ plex_username = ""
211
+ plex_password = ""
212
+ [XBMC]
213
+ xbmc_on_pause = 0
214
+ xbmc_on_stop = 0
215
+ xbmc_username = ""
216
+ xbmc_on_buffer = 0
217
+ xbmc_enabled = 0
218
+ xbmc_on_watched = 0
219
+ xbmc_on_play = 0
220
+ xbmc_host = ""
221
+ xbmc_on_resume = 0
222
+ xbmc_password = ""