Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Silvio Rhatto
Onionmine
Commits
cf77b82b
Verified
Commit
cf77b82b
authored
May 04, 2022
by
Silvio Rhatto
Browse files
Feat(mine): sketching mine-batch and mine-remote (WIP)
parent
4804f6c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
bin/mine-batch
0 → 100755
View file @
cf77b82b
#!/usr/bin/env bash
#
# Mine Onion Service keys using mkp224o: batch mode.
#
# Copyright (C) 2022 Silvio Rhatto <rhatto@torproject.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation, either version 3 of the License,
# or any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Parameters
BASENAME
=
"
`
basename
$0
`
"
DIRNAME
=
"
`
dirname
$0
`
"
source
$DIRNAME
/params
# FIXME
# Batch locally or in remote servers?
# Check if there are any limits for each pool?
# Iterate over all pools and start the mining process
bin/mine-remote
0 → 100755
View file @
cf77b82b
#!/usr/bin/env bash
#
# Mine Onion Service keys using mkp224o on remote servers.
#
# Copyright (C) 2022 Silvio Rhatto <rhatto@torproject.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation, either version 3 of the License,
# or any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Parameters
BASENAME
=
"
`
basename
$0
`
"
DIRNAME
=
"
`
dirname
$0
`
"
source
$DIRNAME
/params
# Check
if
[
-z
"
$CONFIG
"
]
;
then
echo
"usage:
$BASENAME
<config-pool-name>"
exit
1
elif
[
!
-e
"
$FILTERS
"
]
;
then
echo
"
$BASENAME
: no such file
$FILTERS
"
exit
1
fi
# Check remotes
if
[
-z
"
$REMOTE_HOSTS
"
]
;
then
echo
"
$BASENAME
: need to configure REMOTE_HOSTS parameter"
exit
1
fi
# Iterate over all defined hosts
for
host
in
$REMOTE_HOSTS
;
do
# FIXME
#if [ ! -z "$REMOTE_HOSTS_RSYNC" ]; then
# true
#fi
# Connect to the remote host and start a mining operation
if
[
!
-z
"
$REMOTE_HOSTS_SSH_COMMAND
"
]
;
then
$REMOTE_HOSTS_SSH_COMMAND
$host
"make -C
$REMOTE_HOSTS_BASEDIR
mine pool=
$CONFIG
PASSPHRASE=
$PASSPHRASE
"
fi
done
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment