]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Switch xmr stak cpu to xmr stak
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Wed, 31 Oct 2018 08:57:18 +0000 (09:57 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Wed, 31 Oct 2018 09:14:31 +0000 (10:14 +0100)
modules/profile/manifests/xmr_stak.pp
modules/profile/templates/xmr_stak/xmr-stak.conf.erb

index afa72a5dc37d0ad961c92ee9a99adea986c2231f..93aa37d185fa675d18d5427b5b02a0503644de4c 100644 (file)
@@ -11,7 +11,16 @@ class profile::xmr_stak (
     })
 
     ensure_packages(["cpulimit"])
-    aur::package { "xmr-stak_cpu": }
+    aur::package { "xmr-stak_cpu":
+      ensure => "absent"
+    } ->
+    aur::package { "xmr-stak": }
+    ~>
+    exec { "remove cpu.txt":
+      command     => "/usr/bin/rm /var/lib/xmr_stak/cpu.txt",
+      refreshonly => true,
+      before      => Service["xmr-stak"],
+    }
 
     user { "xmr_stak":
       name       => "xmr_stak",
@@ -20,7 +29,7 @@ class profile::xmr_stak (
       home       => "/var/lib/xmr_stak",
       system     => true,
       password   => "!!",
-      require    => Aur::Package["xmr-stak_cpu"],
+      require    => Aur::Package["xmr-stak"],
     }
 
     file { "/etc/systemd/system/xmr-stak.service":
@@ -46,12 +55,12 @@ class profile::xmr_stak (
       enable    => true,
       ensure    => "running",
       subscribe => [
-        Aur::Package["xmr-stak_cpu"],
+        Aur::Package["xmr-stak"],
         File["/var/lib/xmr_stak/xmr-stak.conf"],
         File["/etc/systemd/system/xmr-stak.service"]
       ],
       require   => [
-        Aur::Package["xmr-stak_cpu"],
+        Aur::Package["xmr-stak"],
         File["/var/lib/xmr_stak/xmr-stak.conf"],
         File["/etc/systemd/system/xmr-stak.service"]
       ]
index a1420f25117ed6038a451b5cc2f9904546a7fcde..b9d75a5014642344b7a3289635cade4dd84f14c4 100644 (file)
@@ -3,7 +3,7 @@
 {"pool_address" : "<%= @mining_pool %>", "wallet_address" : "<%= @wallet %>.<%= @instance %>", "rig_id": "", "pool_password" : "<%= @password %>", "use_nicehash" : false, "use_tls" : true, "tls_fingerprint" : "", "pool_weight" : 1 },
 ],
 
-"currency" : "monero7",
+"currency" : "monero",
 "call_timeout" : 10,
 "retry_time" : 30,
 "giveup_limit" : 0,