Do you want to claim rewards for a steem account automatically twice a day? When:
beempy createwallet --wipe)beempy addkey)Installing a timer for claiming rewards twice a day is convenient, but involves some risks. We are storing the posting key of an account on a (remote) server. Everyone that manages it to log in as root on the server will be able to receive the posting key. (The wallet password is stored in the script. After copying the wallet-sql library, the attacker can decrypt the stored posting key with the wallet password.)
Never store an owner key or a master key in a beem wallet!
Knowing this, it is advised to immediately change the posting key, when something unusual happens.
[Unit]
Description=Claim rewards twice daily
[Timer]
OnCalendar=*-*-* 00,12:00:00
RandomizedDelaySec=43200
Persistent=true
[Install]
WantedBy=timers.target
[Unit]
Description=Claim reward service
After=syslog.target
[Service]
Type=oneshot
User=root
Group=root
ExecStart=/root/claimreward.sh
SyslogIdentifier=steem-claimreward
StandardOutput=syslog
StandardError=syslog
#!/bin/bash
beempy updatenodes
export UNLOCK='Your-Wallet-Password'
beempy claimreward yoursteemacc
We store steem-claimreward.timer and steem-claimreward.service in /etc/systemd/system.
cp steem-claimreward.* /etc/systemd/system
The bash script is moved to /root. In order to increase security, we assure that only root can read this file:
chmod 700 /root/claimreward.sh
It is also possible to replace the root user by another user in the steem-claimreward.service. The claimreward.sh has than to moved to a place the user can access.
Now, replace yoursteemacc with the account name from which you want to claim (posting key of this account has to be stored into the beempy wallet). Then you have to replace Your-Wallet-Password with your beempy wallet password.
systemctl reenable --now steem-claimreward.timer
activates the timer. With
systemctl list-timers
or
systemctl status steem-claimreward.timer
you can check for the next execution time point.
The log file can be viewed by:
journalctl -f -u steem-claimreward
systemctl enable steem-claimreward.timer
systemctl disable steem-claimreward.timer
systemctl start steem-claimreward.timer
systemctl stop steem-claimreward.timer