Using chef commands
This commit is contained in:
parent
eb59aaf587
commit
df91d53821
1 changed files with 6 additions and 13 deletions
|
@ -186,10 +186,10 @@ template '/etc/init.d/mailcatcher' do
|
||||||
source 'mailcatcher'
|
source 'mailcatcher'
|
||||||
end
|
end
|
||||||
|
|
||||||
execute 'create_mailcatcher_user' do
|
user 'mailcatcher' do
|
||||||
user 'root'
|
comment 'The mailcatcher user'
|
||||||
command 'useradd -M -r mailcatcher'
|
system true
|
||||||
not_if 'cat /etc/passwd |grep mailcatcher'
|
action :create
|
||||||
end
|
end
|
||||||
|
|
||||||
execute 'mailcatcher_script_executable' do
|
execute 'mailcatcher_script_executable' do
|
||||||
|
@ -198,15 +198,8 @@ execute 'mailcatcher_script_executable' do
|
||||||
not_if 'test -x /etc/init.d/mailcatcher'
|
not_if 'test -x /etc/init.d/mailcatcher'
|
||||||
end
|
end
|
||||||
|
|
||||||
execute 'adding_mailcatcher_boot' do
|
service 'mailcatcher' do
|
||||||
user 'root'
|
action [:enable, :start]
|
||||||
command 'update-rc.d mailcatcher defaults'
|
|
||||||
not_if 'ls /etc/rc0.d/ |grep mailcatcher'
|
|
||||||
end
|
|
||||||
|
|
||||||
execute 'starting_mailcatcher' do
|
|
||||||
user 'root'
|
|
||||||
command 'service mailcatcher start'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
|
Reference in a new issue