aethernal-agent 0.4.0 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +9 -8
- data/aethernal-agent.gemspec +1 -0
- data/lib/aethernal_agent/app.rb +1 -0
- data/lib/aethernal_agent/docker/container_settings.rb +1 -1
- data/lib/aethernal_agent/plugins/bazarr/files/bazarr.service +1 -1
- data/lib/aethernal_agent/plugins/cardigann/files/cardigann.service +1 -1
- data/lib/aethernal_agent/plugins/couchpotato/files/couchpotato.service +1 -1
- data/lib/aethernal_agent/plugins/deluge/deluge.rb +5 -0
- 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/deluged.service.erb +1 -1
- data/lib/aethernal_agent/plugins/deluge/templates/ltconfig.conf.erb +21 -0
- data/lib/aethernal_agent/plugins/jackett/files/jackett.service +1 -1
- 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 +1 -1
- data/lib/aethernal_agent/plugins/nzbget/files/nzbget.service +1 -1
- data/lib/aethernal_agent/plugins/ombi/templates/ombi.service.erb +1 -1
- data/lib/aethernal_agent/plugins/plex-docker/templates/plex_docker.service.erb +1 -1
- data/lib/aethernal_agent/plugins/plex/files/plex.service +1 -1
- data/lib/aethernal_agent/plugins/portainer/templates/portainer.service.erb +1 -1
- data/lib/aethernal_agent/plugins/radarr/files/radarr.service +1 -1
- data/lib/aethernal_agent/plugins/resilio_docker/templates/resilio_docker.service.erb +1 -1
- data/lib/aethernal_agent/plugins/rutorrent/templates/rutorrent.service.erb +1 -1
- data/lib/aethernal_agent/plugins/sabnzbd/files/sabnzbd.service +1 -1
- data/lib/aethernal_agent/plugins/sickchill/files/sickchill.service +1 -1
- data/lib/aethernal_agent/plugins/sonarr/files/sonarr.service +1 -1
- data/lib/aethernal_agent/plugins/tautulli/files/tautulli.service +1 -1
- data/lib/aethernal_agent/version.rb +1 -1
- data/lib/aethernal_agent/webserver/api.rb +6 -0
- metadata +23 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c94842a214bb90fda3cb3f4f3f873fd07c54be50419b2617c04a4b4f781bbbd0
|
4
|
+
data.tar.gz: fc87c8f9dd9bbc6c00d994243994c34a71cc46df22b4d5873b85f4953b7e92a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54471d28ac3221eb126975d04869e981956b68a57ece41f73c1a983c0ffc3c8d24e71756c3539d414c847ae2f4a03f91ea0988dcb425104158859fc2930d38b9
|
7
|
+
data.tar.gz: c88c8faad630609eab8b961aa6b12feaed4a68d1a21c6722361ecd249f38b3970dcd3269926bc9c4885e92ec1a2ae449192572fd2d8dbb032e5c86ed19734bd2
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
aethernal-agent (0.4.
|
5
|
-
activesupport
|
4
|
+
aethernal-agent (0.4.3)
|
5
|
+
activesupport (~> 6.0.3.4)
|
6
6
|
bcrypt
|
7
7
|
docker-api (~> 1.34.2)
|
8
|
+
ruby2_keywords (= 0.0.2)
|
8
9
|
sinatra (~> 2.0.7)
|
9
10
|
sinatra-contrib
|
10
11
|
sqlite3
|
@@ -20,7 +21,7 @@ GEM
|
|
20
21
|
minitest (~> 5.1)
|
21
22
|
tzinfo (~> 1.1)
|
22
23
|
zeitwerk (~> 2.2, >= 2.2.2)
|
23
|
-
backports (3.
|
24
|
+
backports (3.20.1)
|
24
25
|
bcrypt (3.1.16)
|
25
26
|
coderay (1.1.3)
|
26
27
|
concurrent-ruby (1.1.7)
|
@@ -28,11 +29,11 @@ GEM
|
|
28
29
|
docker-api (1.34.2)
|
29
30
|
excon (>= 0.47.0)
|
30
31
|
multi_json
|
31
|
-
excon (0.78.
|
32
|
-
i18n (1.8.
|
32
|
+
excon (0.78.1)
|
33
|
+
i18n (1.8.7)
|
33
34
|
concurrent-ruby (~> 1.0)
|
34
35
|
method_source (1.0.0)
|
35
|
-
minitest (5.14.
|
36
|
+
minitest (5.14.3)
|
36
37
|
multi_json (1.15.0)
|
37
38
|
mustermann (1.1.1)
|
38
39
|
ruby2_keywords (~> 0.0.1)
|
@@ -93,7 +94,7 @@ GEM
|
|
93
94
|
thor (1.0.1)
|
94
95
|
thread_safe (0.3.6)
|
95
96
|
tilt (2.0.10)
|
96
|
-
tzinfo (1.2.
|
97
|
+
tzinfo (1.2.9)
|
97
98
|
thread_safe (~> 0.1)
|
98
99
|
unicode-display_width (1.7.0)
|
99
100
|
zeitwerk (2.4.2)
|
@@ -109,4 +110,4 @@ DEPENDENCIES
|
|
109
110
|
serverspec
|
110
111
|
|
111
112
|
BUNDLED WITH
|
112
|
-
2.
|
113
|
+
2.2.5
|
data/aethernal-agent.gemspec
CHANGED
@@ -38,6 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
spec.add_development_dependency "serverspec"
|
39
39
|
spec.add_development_dependency "pry"
|
40
40
|
spec.add_dependency "activesupport" # We leave this loose to not interfere with Rails projects
|
41
|
+
spec.add_dependency "ruby2_keywords", "0.0.2" # We leave this loose to not interfere with Rails projects
|
41
42
|
spec.add_dependency "sinatra", "~> 2.0.7"
|
42
43
|
spec.add_dependency "sinatra-contrib"
|
43
44
|
spec.add_dependency "sqlite3"
|
data/lib/aethernal_agent/app.rb
CHANGED
@@ -19,7 +19,7 @@ module AethernalAgent
|
|
19
19
|
'Env' => self.env,
|
20
20
|
'HostConfig' =>
|
21
21
|
{
|
22
|
-
'RestartPolicy' => {'Name' => '
|
22
|
+
'RestartPolicy' => {'Name' => 'unless-stopped'},
|
23
23
|
'PortBindings' => self.port_bindings,
|
24
24
|
'Binds' => self.volumes,
|
25
25
|
'Volumes' => {"/data" => {},"/config" => {}},
|
@@ -55,6 +55,11 @@ class AethernalAgent::Deluge < AethernalAgent::App
|
|
55
55
|
deluge_config_path('hostlist.conf'),
|
56
56
|
vars,
|
57
57
|
{owner: vars[:user]})
|
58
|
+
|
59
|
+
write_template(template_path('ltconfig.conf.erb'),
|
60
|
+
deluge_config_path('ltconfig.conf'),
|
61
|
+
vars,
|
62
|
+
{owner: vars[:user]})
|
58
63
|
end
|
59
64
|
end
|
60
65
|
|
@@ -0,0 +1,21 @@
|
|
1
|
+
{
|
2
|
+
"file": 1,
|
3
|
+
"format": 1
|
4
|
+
}{
|
5
|
+
"apply_on_start": true,
|
6
|
+
"settings": {
|
7
|
+
"allow_multiple_connections_per_ip": true,
|
8
|
+
"suggest_mode": 0,
|
9
|
+
"mixed_mode_algorithm": 0,
|
10
|
+
"low_prio_disk": false,
|
11
|
+
"alert_queue_size": 30000,
|
12
|
+
"max_queued_disk_bytes": 5242880,
|
13
|
+
"utp_dynamic_sock_buf": true,
|
14
|
+
"max_allowed_in_request_queue": 1000,
|
15
|
+
"file_pool_size": 100,
|
16
|
+
"inactivity_timeout": 20,
|
17
|
+
"max_failcount": 1,
|
18
|
+
"send_redundant_have": true,
|
19
|
+
"peer_timeout": 20
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
[Unit]
|
2
|
+
Description=Jdownloader
|
3
|
+
After=syslog.target network.target
|
4
|
+
|
5
|
+
[Service]
|
6
|
+
Type=simple
|
7
|
+
ExecStart=/usr/bin/java -XX:MaxHeapSize=512m -XX:InitialHeapSize=512m -jar %h/apps/jdownloader/JDownloader.jar -headless -afterupdate
|
8
|
+
TimeoutStopSec=20
|
9
|
+
KillMode=process
|
10
|
+
Restart=on-failure
|
11
|
+
|
12
|
+
[Install]
|
13
|
+
WantedBy=default.target
|
@@ -0,0 +1,38 @@
|
|
1
|
+
class AethernalAgent::Jdownloader < 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
|
+
run_as('root',"mv #{app_path}/jdownloader/* #{app_path}/")
|
10
|
+
directory(app_path, owner: @user)
|
11
|
+
directory(jdownloader_config_path, owner: @user)
|
12
|
+
end
|
13
|
+
|
14
|
+
def remove_app_user(options = {})
|
15
|
+
super(options) do |opts|
|
16
|
+
directory(app_path, action: :delete)
|
17
|
+
directory(jdownloader_config_path, action: :delete)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def configure_app_user(options = {})
|
22
|
+
self.install_packages(options)
|
23
|
+
|
24
|
+
super(options) do |opts|
|
25
|
+
write_template(template_path('org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json.erb'),
|
26
|
+
"#{app_path}/cfg/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json",
|
27
|
+
opts.merge(server_name: get_global_config(:container_name)),
|
28
|
+
{owner: self.user})
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
protected
|
33
|
+
|
34
|
+
def jdownloader_config_path(path ="/")
|
35
|
+
File.join(home_folder_path(".config/jdownloader"), path)
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
name: Jdownloader
|
2
|
+
script_name: jdownloader.rb
|
3
|
+
version: 0.1
|
4
|
+
required_aethernal_agent_version: ">= 0.2.0"
|
5
|
+
description: JDownloader is a free, open-source download management tool. In order for your Jdownloader to be installed you first have to create an account on my.jdownloader.org with email and password and then use those credentials for the installation of Jdownloader.
|
6
|
+
installation_type: local_install
|
7
|
+
configuration_type: multi_user
|
8
|
+
icon:
|
9
|
+
name: jdownloader.png
|
10
|
+
sha256sum: 5e8be893fb1cca59fb07ba84d9991063434156d4600bae6261350ea3c12329da
|
11
|
+
plain_name: jdownloader
|
12
|
+
web_ui_url: http://my.jdownloader.org/
|
13
|
+
services:
|
14
|
+
- jdownloader
|
15
|
+
actions:
|
16
|
+
restart:
|
17
|
+
user:
|
18
|
+
required: true
|
19
|
+
linux_user: true
|
20
|
+
uninstall:
|
21
|
+
nothing: true
|
22
|
+
install_packages:
|
23
|
+
user:
|
24
|
+
required: true
|
25
|
+
linux_user: true
|
26
|
+
remove_app_user:
|
27
|
+
user:
|
28
|
+
required: true
|
29
|
+
linux_user: true
|
30
|
+
configure_app_user:
|
31
|
+
email:
|
32
|
+
required: true
|
33
|
+
password:
|
34
|
+
required: true
|
35
|
+
return_values:
|
36
|
+
- email
|
37
|
+
- password
|
38
|
+
display_values:
|
39
|
+
- email
|
40
|
+
- password
|
41
|
+
estimated_size_mb: 43
|
42
|
+
package:
|
43
|
+
folder_name: jdownloader
|
44
|
+
direct_download:
|
45
|
+
url: https://storage.googleapis.com/bysh-chef-files/jdownloader.zip
|
46
|
+
target_name: jdownloader.zip
|
47
|
+
auto_extract: true
|
48
|
+
always_latest: true
|
49
|
+
apt:
|
50
|
+
"1804":
|
51
|
+
packages:
|
52
|
+
- default-jre
|
53
|
+
- default-jdk
|
Binary file
|
@@ -49,6 +49,12 @@ module AethernalAgent
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
+
post "/refresh_apache_configuration" do
|
53
|
+
options = {custom_domains: params['custom_domains'], user: params['user']}
|
54
|
+
apache = AethernalAgent::Apache.new(options)
|
55
|
+
apache.ensure_base_config(options)
|
56
|
+
end
|
57
|
+
|
52
58
|
post "/plugins/:app_name/:method_name/?:wait?" do
|
53
59
|
app = params['app_name']
|
54
60
|
method = params['method_name']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aethernal-agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maran
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: ruby2_keywords
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.0.2
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.0.2
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: sinatra
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -250,6 +264,7 @@ files:
|
|
250
264
|
- lib/aethernal_agent/plugins/deluge/templates/deluge.apache.conf.erb
|
251
265
|
- lib/aethernal_agent/plugins/deluge/templates/deluged.service.erb
|
252
266
|
- lib/aethernal_agent/plugins/deluge/templates/hostlist.conf.erb
|
267
|
+
- lib/aethernal_agent/plugins/deluge/templates/ltconfig.conf.erb
|
253
268
|
- lib/aethernal_agent/plugins/deluge/templates/web.conf.erb
|
254
269
|
- lib/aethernal_agent/plugins/filebrowser/filebrowser.rb
|
255
270
|
- lib/aethernal_agent/plugins/filebrowser/files/filebrowser.service
|
@@ -268,6 +283,11 @@ files:
|
|
268
283
|
- lib/aethernal_agent/plugins/jackett/meta/jackett.png
|
269
284
|
- lib/aethernal_agent/plugins/jackett/templates/ServerConfig.json.erb
|
270
285
|
- lib/aethernal_agent/plugins/jackett/templates/jackett.apache.conf.erb
|
286
|
+
- lib/aethernal_agent/plugins/jdownloader/files/jdownloader.service
|
287
|
+
- lib/aethernal_agent/plugins/jdownloader/jdownloader.rb
|
288
|
+
- lib/aethernal_agent/plugins/jdownloader/manifest.yml
|
289
|
+
- lib/aethernal_agent/plugins/jdownloader/meta/jdownloader.png
|
290
|
+
- lib/aethernal_agent/plugins/jdownloader/templates/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json.erb
|
271
291
|
- lib/aethernal_agent/plugins/medusa/files/medusa.service
|
272
292
|
- lib/aethernal_agent/plugins/medusa/manifest.yml
|
273
293
|
- lib/aethernal_agent/plugins/medusa/medusa.rb
|
@@ -391,7 +411,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
391
411
|
- !ruby/object:Gem::Version
|
392
412
|
version: '0'
|
393
413
|
requirements: []
|
394
|
-
rubygems_version: 3.
|
414
|
+
rubygems_version: 3.2.5
|
395
415
|
signing_key:
|
396
416
|
specification_version: 4
|
397
417
|
summary: Aethernal Agent for Aethernal.host.
|