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.
- checksums.yaml +4 -4
- data/COPYING +674 -0
- data/Gemfile.lock +38 -33
- data/README.md +3 -32
- data/Vagrantfile +10 -2
- data/aethernal-agent.gemspec +4 -1
- data/bin/install-aa +121 -0
- data/bin/run-aa-for-test +1 -1
- data/exe/aa-cli +7 -0
- data/lib/aethernal_agent.rb +10 -0
- data/lib/aethernal_agent/apache/apache.rb +8 -5
- data/lib/aethernal_agent/apache/templates/aa-default.conf +2 -0
- data/lib/aethernal_agent/apache/templates/aa-user.conf.erb +2 -0
- data/lib/aethernal_agent/app.rb +82 -22
- data/lib/aethernal_agent/apt.rb +17 -6
- data/lib/aethernal_agent/cli/core.rb +11 -0
- data/lib/aethernal_agent/cli/services.rb +56 -0
- data/lib/aethernal_agent/docker/container_settings.rb +33 -0
- data/lib/aethernal_agent/docker/env.rb +33 -0
- data/lib/aethernal_agent/docker/port_binding.rb +32 -0
- data/lib/aethernal_agent/docker/volume.rb +28 -0
- data/lib/aethernal_agent/filesystem.rb +2 -1
- data/lib/aethernal_agent/loader.rb +3 -3
- data/lib/aethernal_agent/operation.rb +1 -1
- data/lib/aethernal_agent/plugins/bazarr/bazarr.rb +57 -0
- data/lib/aethernal_agent/plugins/bazarr/files/bazarr.service +16 -0
- data/lib/aethernal_agent/plugins/bazarr/manifest.yml +64 -0
- data/lib/aethernal_agent/plugins/bazarr/meta/bazarr.png +0 -0
- data/lib/aethernal_agent/plugins/bazarr/templates/bazarr.apache.conf.erb +5 -0
- data/lib/aethernal_agent/plugins/bazarr/templates/config.ini.erb +135 -0
- data/lib/aethernal_agent/plugins/cardigann/cardigann.rb +45 -0
- data/lib/aethernal_agent/plugins/cardigann/files/cardigann.service +13 -0
- data/lib/aethernal_agent/plugins/cardigann/manifest.yml +36 -0
- data/lib/aethernal_agent/plugins/cardigann/meta/cardigann.png +0 -0
- data/lib/aethernal_agent/plugins/cardigann/templates/cardigann.apache.conf.erb +6 -0
- data/lib/aethernal_agent/plugins/cardigann/templates/config.json.erb +7 -0
- data/lib/aethernal_agent/plugins/couchpotato/couchpotato.rb +45 -0
- data/lib/aethernal_agent/plugins/couchpotato/files/couchpotato.service +13 -0
- data/lib/aethernal_agent/plugins/couchpotato/manifest.yml +37 -0
- data/lib/aethernal_agent/plugins/couchpotato/meta/couchpotato.png +0 -0
- data/lib/aethernal_agent/plugins/couchpotato/templates/couchpotato.apache.conf.erb +4 -0
- data/lib/aethernal_agent/plugins/couchpotato/templates/settings.conf.erb +585 -0
- data/lib/aethernal_agent/plugins/deluge/deluge.rb +5 -0
- data/lib/aethernal_agent/plugins/deluge/manifest.yml +2 -2
- data/lib/aethernal_agent/plugins/deluge/templates/core.conf.erb +1 -1
- data/lib/aethernal_agent/plugins/deluge/templates/deluge-web.service.erb +1 -1
- data/lib/aethernal_agent/plugins/deluge/templates/deluge.apache.conf.erb +0 -1
- data/lib/aethernal_agent/plugins/deluge/templates/deluged.service.erb +1 -1
- data/lib/aethernal_agent/plugins/deluge/templates/ltconfig.conf.erb +21 -0
- data/lib/aethernal_agent/plugins/filebrowser/manifest.yml +1 -1
- data/lib/aethernal_agent/plugins/gitea/manifest.yml +1 -1
- data/lib/aethernal_agent/plugins/jackett/files/jackett.service +15 -0
- data/lib/aethernal_agent/plugins/jackett/jackett.rb +49 -0
- data/lib/aethernal_agent/plugins/jackett/manifest.yml +54 -0
- data/lib/aethernal_agent/plugins/jackett/meta/jackett.png +0 -0
- data/lib/aethernal_agent/plugins/jackett/templates/ServerConfig.json.erb +8 -0
- data/lib/aethernal_agent/plugins/jackett/templates/jackett.apache.conf.erb +5 -0
- data/lib/aethernal_agent/plugins/jdownloader/files/jdownloader.service +13 -0
- data/lib/aethernal_agent/plugins/jdownloader/jdownloader.rb +38 -0
- data/lib/aethernal_agent/plugins/jdownloader/manifest.yml +53 -0
- data/lib/aethernal_agent/plugins/jdownloader/meta/jdownloader.png +0 -0
- data/lib/aethernal_agent/plugins/jdownloader/templates/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json.erb +5 -0
- data/lib/aethernal_agent/plugins/medusa/files/medusa.service +13 -0
- data/lib/aethernal_agent/plugins/medusa/manifest.yml +54 -0
- data/lib/aethernal_agent/plugins/medusa/medusa.rb +47 -0
- data/lib/aethernal_agent/plugins/medusa/meta/medusa.png +0 -0
- data/lib/aethernal_agent/plugins/medusa/templates/config.ini.erb +1308 -0
- data/lib/aethernal_agent/plugins/medusa/templates/medusa.apache.conf.erb +12 -0
- data/lib/aethernal_agent/plugins/nextcloud/manifest.yml +54 -0
- data/lib/aethernal_agent/plugins/nextcloud/meta/nextcloud.png +0 -0
- data/lib/aethernal_agent/plugins/nextcloud/nextcloud.rb +44 -0
- data/lib/aethernal_agent/plugins/nextcloud/templates/nextcloud.apache.conf.erb +4 -0
- data/lib/aethernal_agent/plugins/nzbget/files/nzbget.service +13 -0
- data/lib/aethernal_agent/plugins/nzbget/manifest.yml +54 -0
- data/lib/aethernal_agent/plugins/nzbget/meta/nzbget.png +0 -0
- data/lib/aethernal_agent/plugins/nzbget/nzbget.rb +44 -0
- data/lib/aethernal_agent/plugins/nzbget/templates/nzbget.apache.conf.erb +5 -0
- data/lib/aethernal_agent/plugins/nzbget/templates/nzbget.conf.erb +1508 -0
- data/lib/aethernal_agent/plugins/olaris/manifest.yml +1 -1
- data/lib/aethernal_agent/plugins/ombi/manifest.yml +5 -2
- data/lib/aethernal_agent/plugins/ombi/ombi.rb +59 -22
- data/lib/aethernal_agent/plugins/ombi/templates/ombi.apache.conf.erb +3 -4
- data/lib/aethernal_agent/plugins/ombi/templates/ombi.service.erb +2 -2
- data/lib/aethernal_agent/plugins/plex-docker/manifest.yml +74 -0
- data/lib/aethernal_agent/plugins/plex-docker/meta/plex.png +0 -0
- data/lib/aethernal_agent/plugins/plex-docker/plex_docker.rb +39 -0
- data/lib/aethernal_agent/plugins/plex-docker/templates/Preferences.xml.erb +2 -0
- data/lib/aethernal_agent/plugins/plex-docker/templates/plex_docker.apache.conf.erb +21 -0
- data/lib/aethernal_agent/plugins/plex-docker/templates/plex_docker.service.erb +10 -0
- data/lib/aethernal_agent/plugins/plex/files/plex.service +1 -1
- data/lib/aethernal_agent/plugins/plex/manifest.yml +6 -5
- data/lib/aethernal_agent/plugins/plex/plex.rb +2 -4
- data/lib/aethernal_agent/plugins/plex/templates/Preferences.xml.erb +1 -1
- data/lib/aethernal_agent/plugins/plex/templates/plex.apache.conf.erb +21 -0
- data/lib/aethernal_agent/plugins/portainer/manifest.yml +50 -0
- data/lib/aethernal_agent/plugins/portainer/meta/portainer.png +0 -0
- data/lib/aethernal_agent/plugins/portainer/portainer.rb +38 -0
- data/lib/aethernal_agent/plugins/portainer/templates/portainer.apache.conf.erb +7 -0
- data/lib/aethernal_agent/plugins/portainer/templates/portainer.service.erb +10 -0
- data/lib/aethernal_agent/plugins/radarr/files/radarr.service +2 -2
- data/lib/aethernal_agent/plugins/radarr/manifest.yml +7 -13
- data/lib/aethernal_agent/plugins/radarr/radarr.rb +24 -18
- data/lib/aethernal_agent/plugins/radarr/templates/radarr.apache.conf.erb +3 -4
- data/lib/aethernal_agent/plugins/resilio_docker/manifest.yml +59 -0
- data/lib/aethernal_agent/plugins/resilio_docker/meta/resilio.png +0 -0
- data/lib/aethernal_agent/plugins/resilio_docker/resilio_docker.rb +29 -0
- data/lib/aethernal_agent/plugins/resilio_docker/templates/resilio_docker.apache.conf.erb +11 -0
- data/lib/aethernal_agent/plugins/resilio_docker/templates/resilio_docker.conf.erb +38 -0
- data/lib/aethernal_agent/plugins/resilio_docker/templates/resilio_docker.service.erb +10 -0
- data/lib/aethernal_agent/plugins/rutorrent/manifest.yml +84 -0
- data/lib/aethernal_agent/plugins/rutorrent/meta/rtorrent.png +0 -0
- data/lib/aethernal_agent/plugins/rutorrent/rutorrent.rb +41 -0
- data/lib/aethernal_agent/plugins/rutorrent/templates/rtorrent.rc.erb +69 -0
- data/lib/aethernal_agent/plugins/rutorrent/templates/rutorrent.apache.conf.erb +13 -0
- data/lib/aethernal_agent/plugins/rutorrent/templates/rutorrent.service.erb +10 -0
- data/lib/aethernal_agent/plugins/sabnzbd/files/sabnzbd.service +13 -0
- data/lib/aethernal_agent/plugins/sabnzbd/manifest.yml +43 -0
- data/lib/aethernal_agent/plugins/sabnzbd/meta/sabnzbd.png +0 -0
- data/lib/aethernal_agent/plugins/sabnzbd/sabnzbd.rb +47 -0
- data/lib/aethernal_agent/plugins/sabnzbd/templates/sabnzbd.apache.conf.erb +4 -0
- data/lib/aethernal_agent/plugins/sabnzbd/templates/sabnzbd.ini.erb +188 -0
- data/lib/aethernal_agent/plugins/sickchill/files/sickchill.service +13 -0
- data/lib/aethernal_agent/plugins/sickchill/manifest.yml +58 -0
- data/lib/aethernal_agent/plugins/sickchill/meta/sickchill.png +0 -0
- data/lib/aethernal_agent/plugins/sickchill/sickchill.rb +49 -0
- data/lib/aethernal_agent/plugins/sickchill/templates/config.ini.erb +1078 -0
- data/lib/aethernal_agent/plugins/sickchill/templates/sickchill.apache.conf.erb +4 -0
- data/lib/aethernal_agent/plugins/sonarr/files/sonarr.service +1 -1
- data/lib/aethernal_agent/plugins/sonarr/manifest.yml +3 -2
- data/lib/aethernal_agent/plugins/sonarr/templates/sonarr.apache.conf.erb +3 -4
- data/lib/aethernal_agent/plugins/syncthing/files/syncthing.service +18 -0
- data/lib/aethernal_agent/plugins/syncthing/manifest.yml +38 -0
- data/lib/aethernal_agent/plugins/syncthing/meta/syncthing.png +0 -0
- data/lib/aethernal_agent/plugins/syncthing/syncthing.rb +33 -0
- data/lib/aethernal_agent/plugins/syncthing/templates/config.xml.erb +56 -0
- data/lib/aethernal_agent/plugins/syncthing/templates/syncthing.apache.conf.erb +7 -0
- data/lib/aethernal_agent/plugins/tautulli/files/tautulli.service +13 -0
- data/lib/aethernal_agent/plugins/tautulli/manifest.yml +40 -0
- data/lib/aethernal_agent/plugins/tautulli/meta/tautulli.png +0 -0
- data/lib/aethernal_agent/plugins/tautulli/tautulli.rb +45 -0
- data/lib/aethernal_agent/plugins/tautulli/templates/config.ini.erb +222 -0
- data/lib/aethernal_agent/plugins/tautulli/templates/tautulli.apache.conf.erb +5 -0
- data/lib/aethernal_agent/plugins/vnc/manifest.yml +3 -2
- data/lib/aethernal_agent/systemd.rb +19 -13
- data/lib/aethernal_agent/utils.rb +85 -6
- data/lib/aethernal_agent/version.rb +1 -1
- data/lib/aethernal_agent/webserver/api.rb +1 -1
- data/lib/aethernal_agent/webserver/core.rb +1 -1
- metadata +154 -7
@@ -1,7 +1,7 @@
|
|
1
1
|
name: Olaris Media Server
|
2
2
|
script_name: olaris.rb
|
3
3
|
version: 0.1
|
4
|
-
required_aethernal_agent_version: "
|
4
|
+
required_aethernal_agent_version: ">= 0.2.0"
|
5
5
|
description: Olaris is a free and open-source media server for your personal media collection.
|
6
6
|
installation_type: local_install
|
7
7
|
configuration_type: multi_user
|
@@ -1,7 +1,7 @@
|
|
1
1
|
name: Ombi
|
2
2
|
script_name: ombi.rb
|
3
3
|
version: 0.1
|
4
|
-
required_aethernal_agent_version: "
|
4
|
+
required_aethernal_agent_version: ">= 0.2.0"
|
5
5
|
description: Ombi is a self-hosted web application that automatically gives your shared Plex or Emby users the ability to request content by themselves!
|
6
6
|
installation_type: local_install
|
7
7
|
configuration_type: multi_user
|
@@ -41,6 +41,9 @@ actions:
|
|
41
41
|
return_values:
|
42
42
|
- password
|
43
43
|
- port
|
44
|
+
display_values:
|
45
|
+
- user
|
46
|
+
- password
|
44
47
|
estimated_size_mb: 23
|
45
48
|
package:
|
46
49
|
folder_name: ombi
|
@@ -50,7 +53,7 @@ package:
|
|
50
53
|
auto_extract: true
|
51
54
|
always_latest: false
|
52
55
|
apt:
|
53
|
-
"
|
56
|
+
"1804":
|
54
57
|
packages:
|
55
58
|
- libicu-dev
|
56
59
|
- libunwind8
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'httparty'
|
2
|
-
|
3
1
|
class AethernalAgent::Ombi < AethernalAgent::App
|
4
2
|
|
5
3
|
def initialize(options = {})
|
@@ -23,10 +21,17 @@ class AethernalAgent::Ombi < AethernalAgent::App
|
|
23
21
|
self.install_packages(options)
|
24
22
|
super(options) do |opts|
|
25
23
|
ensure_permissions
|
26
|
-
@timer = 0
|
27
24
|
@opts = opts
|
25
|
+
@opts[:config_path] = ombi_config_path
|
28
26
|
end
|
27
|
+
@timer = 0
|
29
28
|
add_user_to_db
|
29
|
+
@timer = 0
|
30
|
+
get_ombi_token
|
31
|
+
@timer = 0
|
32
|
+
set_ombi_base_url
|
33
|
+
AethernalAgent.logger.info("fininshed, returning args #{@opts}")
|
34
|
+
self.restart
|
30
35
|
return create_return_args(@opts)
|
31
36
|
end
|
32
37
|
|
@@ -49,33 +54,65 @@ class AethernalAgent::Ombi < AethernalAgent::App
|
|
49
54
|
def add_user_to_db
|
50
55
|
begin
|
51
56
|
AethernalAgent.logger.info("Calling Ombi API to create our initial user for #{self.user}")
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
sleep 60
|
59
|
-
if @timer < 6
|
60
|
-
add_user_to_db
|
57
|
+
uri = URI(ombi_api_url(@opts["port"], "Identity/Wizard"))
|
58
|
+
req = Net::HTTP::Post.new(uri)
|
59
|
+
req.content_type = 'application/json'
|
60
|
+
req.body = {username: self.user, password: @opts[:password], usePlexAdminAccount: false}.to_json
|
61
|
+
Net::HTTP.start(uri.host, uri.port) do |http|
|
62
|
+
response = http.request(req)
|
61
63
|
end
|
64
|
+
AethernalAgent.logger.info('fininshed adding user')
|
65
|
+
rescue => error
|
66
|
+
AethernalAgent.logger.info(error.inspect)
|
67
|
+
loop_till_success(:add_user_to_db)
|
62
68
|
end
|
63
69
|
end
|
64
70
|
|
65
|
-
def
|
66
|
-
|
71
|
+
def get_ombi_token
|
72
|
+
AethernalAgent.logger.info("Getting Ombi token for user #{self.user}")
|
73
|
+
uri = URI(ombi_api_url(@opts["port"], "token"))
|
74
|
+
req = Net::HTTP::Post.new(uri)
|
75
|
+
req.content_type = 'application/json'
|
76
|
+
req.body = {username: self.user, password: @opts[:password], rememberMe: false}.to_json
|
77
|
+
Net::HTTP.start(uri.host, uri.port) do |http|
|
78
|
+
response = http.request(req)
|
79
|
+
@access_token = JSON.parse(response.body)['access_token']
|
80
|
+
if !@access_token.present?
|
81
|
+
loop_till_success(:get_ombi_token)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
AethernalAgent.logger.info('fininshed getting acces token')
|
67
85
|
end
|
68
86
|
|
69
|
-
def
|
70
|
-
|
87
|
+
def set_ombi_base_url
|
88
|
+
AethernalAgent.logger.info("Updating Ombi settings for user #{@user}")
|
89
|
+
uri = URI(ombi_api_url(@opts["port"], "Settings/ombi"))
|
90
|
+
req = Net::HTTP::Post.new(uri)
|
91
|
+
req['Authorization'] = "Bearer #{@access_token}"
|
92
|
+
req.content_type = 'application/json'
|
93
|
+
|
94
|
+
req.body = {baseUrl: "/ombi", wizard: false}.to_json
|
95
|
+
Net::HTTP.start(uri.host, uri.port) do |http|
|
96
|
+
response = http.request(req)
|
97
|
+
if !response.body.in?(['true', true])
|
98
|
+
AethernalAgent.logger.info("Response message: #{response.message}")
|
99
|
+
loop_till_success(:set_ombi_base_url)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
AethernalAgent.logger.info('fininshed adding ombi base url')
|
103
|
+
end
|
104
|
+
|
105
|
+
def ombi_api_url(web_port, path)
|
106
|
+
return "http://127.0.0.1:#{web_port}/api/v1/#{path}"
|
71
107
|
end
|
72
108
|
|
73
|
-
def
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
109
|
+
def loop_till_success(method)
|
110
|
+
@timer += 1
|
111
|
+
AethernalAgent.logger.info("#{method.to_s} not succesfull, looping #{@timer}th time.")
|
112
|
+
sleep 60
|
113
|
+
if @timer < 20
|
114
|
+
method(method).call
|
79
115
|
end
|
80
116
|
end
|
117
|
+
|
81
118
|
end
|
@@ -1,6 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
ProxyPassReverse http://localhost:<%= @port %>
|
1
|
+
<Location /ombi>
|
2
|
+
ProxyPass http://localhost:<%= @port %>/ombi
|
3
|
+
ProxyPassReverse http://localhost:<%= @port %>/ombi
|
5
4
|
Require all granted
|
6
5
|
</Location>
|
@@ -4,11 +4,11 @@ After=network-online.target
|
|
4
4
|
|
5
5
|
[Service]
|
6
6
|
WorkingDirectory=%h/apps/ombi/
|
7
|
-
ExecStart=%h/apps/ombi/Ombi --host "http://*:<%= @port %>"
|
7
|
+
ExecStart=%h/apps/ombi/Ombi --host "http://*:<%= @port %>" --storage <%= @config_path %>
|
8
8
|
Type=simple
|
9
9
|
TimeoutStopSec=30
|
10
10
|
Restart=on-failure
|
11
11
|
RestartSec=5
|
12
12
|
|
13
13
|
[Install]
|
14
|
-
WantedBy=
|
14
|
+
WantedBy=default.target
|
@@ -0,0 +1,74 @@
|
|
1
|
+
name: Plex Media Server (Docker)
|
2
|
+
script_name: plex_docker.rb
|
3
|
+
version: 0.1
|
4
|
+
required_aethernal_agent_version: ">= 0.3.0"
|
5
|
+
description: Plex is a client–server media player system plus an ancillary software suite. The Plex Media Server desktop application runs on Windows, macOS, and Linux.
|
6
|
+
installation_type: docker_image
|
7
|
+
configuration_type: multi_user
|
8
|
+
plain_name: plex_docker
|
9
|
+
apache_configuration: plex_docker.apache.conf.erb
|
10
|
+
built_in_updater: false
|
11
|
+
icon:
|
12
|
+
name: plex.png
|
13
|
+
sha256sum: 2c35c38cb223826938c96faff20bee4fc32df728a34028119a61832657f8f997
|
14
|
+
services:
|
15
|
+
- plex_docker
|
16
|
+
actions:
|
17
|
+
claim:
|
18
|
+
claim_token:
|
19
|
+
required: true
|
20
|
+
user:
|
21
|
+
required: true
|
22
|
+
linux_user: true
|
23
|
+
restart:
|
24
|
+
user:
|
25
|
+
required: true
|
26
|
+
linux_user: true
|
27
|
+
configure_app_user:
|
28
|
+
config_mount:
|
29
|
+
value: /home/$user/config/plex
|
30
|
+
required: true
|
31
|
+
docker:
|
32
|
+
volume: /config
|
33
|
+
transcode_mount:
|
34
|
+
value: /home/$user/transcode
|
35
|
+
required: true
|
36
|
+
docker:
|
37
|
+
volume: /transcode
|
38
|
+
media_mount:
|
39
|
+
value: /home/$user/media
|
40
|
+
required: true
|
41
|
+
docker:
|
42
|
+
volume: /data
|
43
|
+
uid:
|
44
|
+
docker:
|
45
|
+
env: PLEX_UID
|
46
|
+
auto_source: user_id
|
47
|
+
required: false
|
48
|
+
claim_token:
|
49
|
+
docker:
|
50
|
+
env: PLEX_CLAIM
|
51
|
+
required: true
|
52
|
+
hint: You can grab your claim token from https://plex.tv/claim
|
53
|
+
port:
|
54
|
+
auto_generate: true
|
55
|
+
external_port: host_port
|
56
|
+
required: false
|
57
|
+
docker:
|
58
|
+
source: 32400/tcp
|
59
|
+
host_port:
|
60
|
+
required: false
|
61
|
+
timezone:
|
62
|
+
required: false
|
63
|
+
value: "Europe/Amsterdam"
|
64
|
+
docker:
|
65
|
+
env: TZ
|
66
|
+
user:
|
67
|
+
required: true
|
68
|
+
linux_user: true
|
69
|
+
display_values:
|
70
|
+
|
71
|
+
estimated_size_mb: 30
|
72
|
+
package:
|
73
|
+
docker:
|
74
|
+
image: "plexinc/pms-docker:latest"
|
Binary file
|
@@ -0,0 +1,39 @@
|
|
1
|
+
class AethernalAgent::PlexDocker < 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 configure_app_user(options = {})
|
11
|
+
install_packages(options)
|
12
|
+
|
13
|
+
super do |opts|
|
14
|
+
self.container_settings.env << "ADVERTISE_IP=http://#{self.container_domain}:#{opts[:host_port]}"
|
15
|
+
|
16
|
+
write_template(template_path('Preferences.xml.erb'),
|
17
|
+
File.join(opts[:config_mount],'/Library/Application Support/Plex Media Server/Preferences.xml'),
|
18
|
+
opts.merge(domain: self.container_domain, container_name: get_global_config(:container_name)),
|
19
|
+
{owner: self.user})
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def uninstall_packages(options = {})
|
24
|
+
super(options)
|
25
|
+
end
|
26
|
+
|
27
|
+
def remove_app_user(options = {})
|
28
|
+
uninstall_packages(options)
|
29
|
+
super(options)
|
30
|
+
end
|
31
|
+
|
32
|
+
def claim(options = {})
|
33
|
+
AethernalAgent.logger.info("Claiming server")
|
34
|
+
ensure_action_options('claim', options)
|
35
|
+
run_command("curl -v -X POST http://127.0.0.1:32400/myplex/claim?token=#{options['claim_token']}")
|
36
|
+
AethernalAgent.logger.info("Done claiming server")
|
37
|
+
return create_return_args(options)
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<Preferences FSEventLibraryUpdatesEnabled="1" FSEventLibraryPartialScanEnabled="1" ManualPortMappingPort="<%= @host_port %>" PublishServerOnPlexOnlineKey="1" ManualPortMappingMode="1" customConnections="http://<%= @domain%>:<%= @host_port %>" FriendlyName="<%=@user%>@<%= @container_name %>" MetricsEpoch="0"/>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<Location /web>
|
2
|
+
ProxyPass http://localhost:<%= @port %>/web
|
3
|
+
ProxyPassReverse http://localhost:<%= @port %>/web
|
4
|
+
</Location>
|
5
|
+
|
6
|
+
<Location /plex>
|
7
|
+
ProxyPass http://localhost:<%= @port %>/web
|
8
|
+
RequestHeader set X-Forwarded-Proto "https" env=HTTPS
|
9
|
+
RequestHeader set X-Forwarded-Ssl on
|
10
|
+
RequestHeader set X-Forwarded-Port "443"
|
11
|
+
ProxyPassReverse http://localhost:<%= @port %>/web
|
12
|
+
</Location>
|
13
|
+
|
14
|
+
<Location /plex.ws>
|
15
|
+
# Websockets
|
16
|
+
ProxyPass ws://127.0.0.1:<%= @port %>/web/plex/ws keepalive=On timeout=600 retry=1 acquire=3000
|
17
|
+
ProxyPassReverse ws://127.0.0.1:<%= @port %>/web/plex/ws
|
18
|
+
|
19
|
+
ProxyPassReverseCookieDomain 127.0.0.1 %{HTTP:Host}
|
20
|
+
</Location>
|
21
|
+
|
@@ -1,8 +1,8 @@
|
|
1
1
|
name: Plex Media Server
|
2
2
|
script_name: plex.rb
|
3
|
-
version: 0.
|
4
|
-
required_aethernal_agent_version: "
|
5
|
-
description: Plex is
|
3
|
+
version: 0.2
|
4
|
+
required_aethernal_agent_version: ">= 0.2.0"
|
5
|
+
description: Plex is a client–server media player system plus an ancillary software suite. The Plex Media Server desktop application runs on Windows, macOS, and Linux.
|
6
6
|
installation_type: global_install
|
7
7
|
configuration_type: server_wide
|
8
8
|
plain_name: plex
|
@@ -29,8 +29,9 @@ actions:
|
|
29
29
|
hint: You can grab your claim token from https://plex.tv/claim
|
30
30
|
port:
|
31
31
|
value: 32400
|
32
|
-
external_port:
|
32
|
+
external_port: host_port
|
33
33
|
read_only: true
|
34
|
+
required: false
|
34
35
|
host_port:
|
35
36
|
required: false
|
36
37
|
user:
|
@@ -40,7 +41,7 @@ actions:
|
|
40
41
|
estimated_size_mb: 30
|
41
42
|
package:
|
42
43
|
apt:
|
43
|
-
"
|
44
|
+
"1804":
|
44
45
|
add_sources:
|
45
46
|
plex:
|
46
47
|
source_url: "deb https://downloads.plex.tv/repo/deb public main"
|
@@ -15,10 +15,8 @@ class AethernalAgent::Plex < AethernalAgent::App
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def remove_app_user(options = {})
|
18
|
-
|
19
|
-
|
20
|
-
directory("/usr/lib/plexmediaserver/", action: :delete)
|
21
|
-
end
|
18
|
+
uninstall_packages(options)
|
19
|
+
super(options)
|
22
20
|
end
|
23
21
|
|
24
22
|
def configure_app_user(options = {})
|
@@ -1,2 +1,2 @@
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
2
|
-
<Preferences ManualPortMappingPort="<%= @host_port %>" PublishServerOnPlexOnlineKey="1" ManualPortMappingMode="1" customConnections="http://<%= @domain%>:<%= @host_port %>" MetricsEpoch="0"/>
|
2
|
+
<Preferences FSEventLibraryUpdatesEnabled="1" FSEventLibraryPartialScanEnabled="1" ManualPortMappingPort="<%= @host_port %>" PublishServerOnPlexOnlineKey="1" ManualPortMappingMode="1" customConnections="http://<%= @domain%>:<%= @host_port %>" FriendlyName="<%=@user%> @ Aethernal" MetricsEpoch="0"/>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<Location /web>
|
2
|
+
ProxyPass http://localhost:32400/web
|
3
|
+
ProxyPassReverse http://localhost:32400/web
|
4
|
+
</Location>
|
5
|
+
|
6
|
+
<Location /plex>
|
7
|
+
ProxyPass http://localhost:32400/web
|
8
|
+
RequestHeader set X-Forwarded-Proto "https" env=HTTPS
|
9
|
+
RequestHeader set X-Forwarded-Ssl on
|
10
|
+
RequestHeader set X-Forwarded-Port "443"
|
11
|
+
ProxyPassReverse http://localhost:32400/web
|
12
|
+
</Location>
|
13
|
+
|
14
|
+
<Location /plex.ws>
|
15
|
+
# Websockets
|
16
|
+
ProxyPass ws://127.0.0.1:32400/web/plex/ws keepalive=On timeout=600 retry=1 acquire=3000
|
17
|
+
ProxyPassReverse ws://127.0.0.1:32400/web/plex/ws
|
18
|
+
|
19
|
+
ProxyPassReverseCookieDomain 127.0.0.1 %{HTTP:Host}
|
20
|
+
</Location>
|
21
|
+
|
@@ -0,0 +1,50 @@
|
|
1
|
+
name: Portainer
|
2
|
+
script_name: portainer.rb
|
3
|
+
version: 0.1
|
4
|
+
required_aethernal_agent_version: ">= 0.3.0"
|
5
|
+
description: MAKING DOCKER MANAGEMENT EASY. Build and manage your Docker environments with ease today.
|
6
|
+
installation_type: docker_image
|
7
|
+
configuration_type: multi_user
|
8
|
+
plain_name: portainer
|
9
|
+
built_in_updater: false
|
10
|
+
apache_configuration: portainer.apache.conf.erb
|
11
|
+
icon:
|
12
|
+
name: portainer.png
|
13
|
+
sha256sum: 6a9de1a335dac6eb12dd4340ec0dd79e0c7c2481f542dba3e5da700317e2e33e
|
14
|
+
services:
|
15
|
+
- portainer
|
16
|
+
actions:
|
17
|
+
restart:
|
18
|
+
user:
|
19
|
+
required: true
|
20
|
+
linux_user: true
|
21
|
+
configure_app_user:
|
22
|
+
password:
|
23
|
+
required: false
|
24
|
+
auto_generate: true
|
25
|
+
docker_socket:
|
26
|
+
required: true
|
27
|
+
value: /var/run/docker.sock
|
28
|
+
docker:
|
29
|
+
volume: /var/run/docker.sock
|
30
|
+
data_volume:
|
31
|
+
value: /home/$user/data/portainer
|
32
|
+
required: true
|
33
|
+
docker:
|
34
|
+
volume: /data
|
35
|
+
port:
|
36
|
+
auto_generate_port: true
|
37
|
+
min: 9900
|
38
|
+
max: 19999
|
39
|
+
docker:
|
40
|
+
source: 9000/tcp
|
41
|
+
user:
|
42
|
+
required: true
|
43
|
+
linux_user: true
|
44
|
+
display_values:
|
45
|
+
|
46
|
+
estimated_size_mb: 30
|
47
|
+
package:
|
48
|
+
docker:
|
49
|
+
# We use develop for now to get proper IPv6 support in, see: https://www.portainer.io/2020/04/ipv6-support-in-portainer/
|
50
|
+
image: "portainerci/portainer:develop"
|