Last active
May 14, 2021 07:35
-
-
Save akostadinov/55e907b1e20d4b7700fa7b88791a82ae to your computer and use it in GitHub Desktop.
Example xmr-stak systemd service unit file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=xmr-stak miner | |
After=syslog.target network.target | |
[Service] | |
Type=simple | |
# interesting info about starting as regular user: https://bbs.archlinux.org/viewtopic.php?id=162297 | |
User=username | |
LimitMEMLOCK=256M | |
EnvironmentFile=-/etc/sysconfig/xmr-stak | |
ExecStart=/path/xmr-stak/bin/xmr-stak --currency monero -o pool.example.com:3333 -u my_wallet -p x --config /path/xmr-stak/config.txt --cpu /path/xmr-stak/cpu.txt | |
Restart=always | |
RestartSec=30 | |
[Install] | |
WantedBy=multi-user.target | |
# save this file in /etc/systemd/system/xmr-stak.service | |
# systemctl enable xmr-stak | |
# systemctl start xmr-stak | |
# note, xmr-stak executable must have selinux context unconfined_u:object_r:bin_t:s0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@semelon , you just create it with whatever environemnt variables you want you program to work with.