1 class profile::xmr_stak (
4 Optional[String] $cpulimit = "50",
5 Optional[String] $password = "x",
7 unless empty($mining_pool) or $cpulimit == "0" {
8 ensure_resource('exec', 'systemctl daemon-reload', {
9 command => '/usr/bin/systemctl daemon-reload',
13 ensure_packages(["cpulimit"])
14 aur::package { "xmr-stak_cpu":
17 aur::package { "xmr-stak": }
19 exec { "remove cpu.txt":
20 command => "/usr/bin/rm /var/lib/xmr_stak/cpu.txt",
22 before => Service["xmr-stak"],
29 home => "/var/lib/xmr_stak",
32 require => Aur::Package["xmr-stak"],
35 file { "/etc/systemd/system/xmr-stak.service":
39 content => template("profile/xmr_stak/xmr-stak.service.erb"),
40 require => User["xmr_stak"],
41 notify => Exec["systemctl daemon-reload"]
44 $instance = regsubst(lookup("base_installation::ldap_cn"), '\.', "_", "G")
46 file { "/var/lib/xmr_stak/xmr-stak.conf":
50 content => template("profile/xmr_stak/xmr-stak.conf.erb"),
51 require => User["xmr_stak"],
58 Aur::Package["xmr-stak"],
59 File["/var/lib/xmr_stak/xmr-stak.conf"],
60 File["/etc/systemd/system/xmr-stak.service"]
63 Aur::Package["xmr-stak"],
64 File["/var/lib/xmr_stak/xmr-stak.conf"],
65 File["/etc/systemd/system/xmr-stak.service"]