Skip to content

Commit 83ba220

Browse files
committed
Adding shell alias for each cryptocoin to simplify command line tasks
1 parent 489e433 commit 83ba220

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

cookbooks/altcointip/metadata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
maintainer_email 'vindimy@gmail.com'
44
license 'All rights reserved'
55
description 'Installs/Configures altcointip, Reddit altcoin tip bot'
6-
version '0.1.1'
6+
version '0.1.2'
77

88
depends "apache2"
99
depends "database"

cookbooks/altcointip/recipes/default.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,17 @@
7979

8080
end
8181

82+
template '/etc/profile.d/coin_alias.sh' do
83+
source 'coin_alias.sh.erb'
84+
backup false
85+
user 'root'
86+
group 'root'
87+
mode '0755'
88+
variables({
89+
:coins => node[:altcointip][:cryptocoins]
90+
})
91+
end
92+
8293

8394
# Set up altcointip
8495

cookbooks/altcointip/templates/default/coin.conf.erb

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<%
2+
@coins.each do |key, coin|
3+
if coin[:enabled]
4+
coindir = File.join(node[:altcointip][:install_dir], 'coins', coin[:name])
5+
%>
6+
alias <%= coin[:name] %>d='<%= coindir %>/<%= coin[:name] %>d -datadir=<%= coindir %>/data -conf=<%= coindir %>/<%= coin[:name] %>.conf'
7+
<%
8+
end
9+
end
10+
%>

0 commit comments

Comments
 (0)