diff options
-rw-r--r-- | modules/profile/manifests/xmr_stak.pp | 17 | ||||
-rw-r--r-- | modules/profile/templates/xmr_stak/xmr-stak.conf.erb | 2 |
2 files changed, 14 insertions, 5 deletions
diff --git a/modules/profile/manifests/xmr_stak.pp b/modules/profile/manifests/xmr_stak.pp index afa72a5..93aa37d 100644 --- a/modules/profile/manifests/xmr_stak.pp +++ b/modules/profile/manifests/xmr_stak.pp | |||
@@ -11,7 +11,16 @@ class profile::xmr_stak ( | |||
11 | }) | 11 | }) |
12 | 12 | ||
13 | ensure_packages(["cpulimit"]) | 13 | ensure_packages(["cpulimit"]) |
14 | aur::package { "xmr-stak_cpu": } | 14 | aur::package { "xmr-stak_cpu": |
15 | ensure => "absent" | ||
16 | } -> | ||
17 | aur::package { "xmr-stak": } | ||
18 | ~> | ||
19 | exec { "remove cpu.txt": | ||
20 | command => "/usr/bin/rm /var/lib/xmr_stak/cpu.txt", | ||
21 | refreshonly => true, | ||
22 | before => Service["xmr-stak"], | ||
23 | } | ||
15 | 24 | ||
16 | user { "xmr_stak": | 25 | user { "xmr_stak": |
17 | name => "xmr_stak", | 26 | name => "xmr_stak", |
@@ -20,7 +29,7 @@ class profile::xmr_stak ( | |||
20 | home => "/var/lib/xmr_stak", | 29 | home => "/var/lib/xmr_stak", |
21 | system => true, | 30 | system => true, |
22 | password => "!!", | 31 | password => "!!", |
23 | require => Aur::Package["xmr-stak_cpu"], | 32 | require => Aur::Package["xmr-stak"], |
24 | } | 33 | } |
25 | 34 | ||
26 | file { "/etc/systemd/system/xmr-stak.service": | 35 | file { "/etc/systemd/system/xmr-stak.service": |
@@ -46,12 +55,12 @@ class profile::xmr_stak ( | |||
46 | enable => true, | 55 | enable => true, |
47 | ensure => "running", | 56 | ensure => "running", |
48 | subscribe => [ | 57 | subscribe => [ |
49 | Aur::Package["xmr-stak_cpu"], | 58 | Aur::Package["xmr-stak"], |
50 | File["/var/lib/xmr_stak/xmr-stak.conf"], | 59 | File["/var/lib/xmr_stak/xmr-stak.conf"], |
51 | File["/etc/systemd/system/xmr-stak.service"] | 60 | File["/etc/systemd/system/xmr-stak.service"] |
52 | ], | 61 | ], |
53 | require => [ | 62 | require => [ |
54 | Aur::Package["xmr-stak_cpu"], | 63 | Aur::Package["xmr-stak"], |
55 | File["/var/lib/xmr_stak/xmr-stak.conf"], | 64 | File["/var/lib/xmr_stak/xmr-stak.conf"], |
56 | File["/etc/systemd/system/xmr-stak.service"] | 65 | File["/etc/systemd/system/xmr-stak.service"] |
57 | ] | 66 | ] |
diff --git a/modules/profile/templates/xmr_stak/xmr-stak.conf.erb b/modules/profile/templates/xmr_stak/xmr-stak.conf.erb index a1420f2..b9d75a5 100644 --- a/modules/profile/templates/xmr_stak/xmr-stak.conf.erb +++ b/modules/profile/templates/xmr_stak/xmr-stak.conf.erb | |||
@@ -3,7 +3,7 @@ | |||
3 | {"pool_address" : "<%= @mining_pool %>", "wallet_address" : "<%= @wallet %>.<%= @instance %>", "rig_id": "", "pool_password" : "<%= @password %>", "use_nicehash" : false, "use_tls" : true, "tls_fingerprint" : "", "pool_weight" : 1 }, | 3 | {"pool_address" : "<%= @mining_pool %>", "wallet_address" : "<%= @wallet %>.<%= @instance %>", "rig_id": "", "pool_password" : "<%= @password %>", "use_nicehash" : false, "use_tls" : true, "tls_fingerprint" : "", "pool_weight" : 1 }, |
4 | ], | 4 | ], |
5 | 5 | ||
6 | "currency" : "monero7", | 6 | "currency" : "monero", |
7 | "call_timeout" : 10, | 7 | "call_timeout" : 10, |
8 | "retry_time" : 30, | 8 | "retry_time" : 30, |
9 | "giveup_limit" : 0, | 9 | "giveup_limit" : 0, |