From d42b42842788440edcf5d8d4c065c6860290603a Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sat, 28 Jan 2023 20:25:39 +0900 Subject: [PATCH] Add `everun.club`-related files. --- cookbooks/nginx/files/etc/cron.d/lego | 25 +++++++++++-------- cookbooks/nginx/files/etc/lego/everun_run.sh | 8 ++++++ cookbooks/nginx/files/etc/lego/kazu634_run.sh | 8 ++++++ cookbooks/nginx/lego.rb | 23 +++++++++-------- 4 files changed, 43 insertions(+), 21 deletions(-) create mode 100644 cookbooks/nginx/files/etc/lego/everun_run.sh create mode 100644 cookbooks/nginx/files/etc/lego/kazu634_run.sh diff --git a/cookbooks/nginx/files/etc/cron.d/lego b/cookbooks/nginx/files/etc/cron.d/lego index 24ce6b7..10c1a49 100644 --- a/cookbooks/nginx/files/etc/cron.d/lego +++ b/cookbooks/nginx/files/etc/cron.d/lego @@ -1,10 +1,15 @@ -md5:c198ab6d9a81886d9cdf034ced32690d:salt:60-164-230-14-22-35-114-134:aes-256-cfb:atMw5FrhPmOlYIuYK/874SqBpeIBEjWtsDIyOFJzrmWywTHKczcGsev1hngX -zKyL249Q78t+aoFmNIBxZq/SxToTPbeP5hsBs5ELn2IVHwR0/uBfJD4e0irN -cGfeOMDo8n7CLwYruoAzHeTlFxJUVzZg49h5ZdlIlWjnOsgXffdi8SRvD2v8 -hBFppx5ynNaI7Cue4YBf0DtjejuWiimXZZz0GkDjHHHK5ie2/BdHUGrLLPEQ -o8ZvVUxUhxQ3Kk0flqiwlXVKZs16qB589lG4nCJ5NV0KbkAdJ1GPHK0+yBTz -D21Cz0ilals+WhrVhFXZjZyUM73auhCXJC98vffdrhDfoQZyZTUD3NGWpgnP -Jy1T4nEi5HhXKgvvBEob2M85BfBlP1x1ll4ear/c+18Uf98k08/Rsya4xYqf -W6Uq4RHeVEgK4QsLbWxENhstjpc/RIW0yds6WEdJzwayu5MSVeQ4A24HALke -Kxv5MUs81lzlMjwBWmv+AAgdn842A1OpkHPoqRUr6incxQwkqRvSDQw8R02Y -MJovgrblcRVpPo/HYsdGkqAlEv4FcCK3XRd8yiczghUlkhNokB8= \ No newline at end of file +md5:c79b07af6291083d791d1902a2637509:salt:199-29-148-147-93-118-94-214:aes-256-cfb:+1A39ytpBJ0l9yD+eCP5DmHnSILgFr9JLu0o+JoVbBEY2JoJiv6e0M23etSN +OHHH/AlnnrSarWA7UzO3aXZP8aNsi5N6VWXwGLw4XtqnwjWryUebGjIDwGrU +ioN1q0lVfw+Yqo5k27eVrVJNrL/Ki/Uu5NPqdGZScFcBq4FYjDUfFAuJqKCB +LAf24VqY3d9DhxibsVlM4kkEczOzjX0opRLPAyef50pSlu53SCnM/93v8ekN +03JUPGove1klD+gwYBWEx6PLJp/ECnPeRhIqRayEDTpGQ7kVoK7zruJGTPhj +Esk9yd6wabSHVv7TrsyFQxqzVn93zd/KnivKtCs1qf7kvg24zpvAygjn5RhW +MyXxIPDw7TE64xzwzhmu2/mVRZrUxsY2entJ9OJFqi9a7n54Io6iLKN70b3R +ecg2qXX8arlSKqb4QzqegRr1/w3t67EsuyTArU6Juj48gHKGiwbp9pdMTLdZ +L7lLUn8pbFNldWFCT4UjYtXPPpdNbm9Fp4RQXTYZdY8cYYGHzffLwCk7GlGX +uTpXtmGnfyQtZm+c7X2MP/dWCyyexBQXj+S5YSdE47XVYMnCKrVJjej6Q2je +qTd+Axrzn9K4p7Q9fOwOKLMUXOgfMMmHbfw2xmcpt+oWIWm+JyiGngylOu0b +zxWrff+iUIL0EedLSes0Opc4/gFKqa97r5qv5qwDKR7jgjeULDe6Rzn/Xv+M +lVGm3YGZnnNGG7Nf/qIn2SEyEi89DbPTLfOeeFx1ThVMVTjU7sLivyIrmz5e +8T0Cq/i9K2A8iijhyOugDWikNCRjQK8ZzL6WAtzL7nWLYp5jCTD9PFMfDgFo +7t4zAqat4iT1HtZdt7hiUO5MbA== \ No newline at end of file diff --git a/cookbooks/nginx/files/etc/lego/everun_run.sh b/cookbooks/nginx/files/etc/lego/everun_run.sh new file mode 100644 index 0000000..3d6e67b --- /dev/null +++ b/cookbooks/nginx/files/etc/lego/everun_run.sh @@ -0,0 +1,8 @@ +md5:df0ea1b9e848b4d488d94b074a8333bc:salt:129-106-54-22-251-200-213-225:aes-256-cfb:akssatsbE+VNSQFBLmfoNF9tmQIUUG3zVldlguf3ozMbAHsVE20PK8cn4r1u +Egig2JYDPDBukqoUcC5Mqt+UVu93fBgNkOB8Q0ndTUkGXdSUrSZY5S4pDMOf +aZW9KnqfegZjAiTBaSmR5YkTQ9RIZMzDqSiSPb3W3R4p0/9ybr1rwBCwRHLI +oP0YYve/khm6wmdz3QAzPXeRp0cyuvHMS0MIUM7rLxJA2hQ5ZzsuSOmT9Wb9 +40WxtOvb1fccE8Q2UXN6oyfmlzFLYtG4lwnKVNQCqwj9/PhS8c55bp6NYPf9 +wAuMOAoWL5lZ1cUY8Tg7a7j5O0Ej9M/HHbf9wL1OWvF9otwsNHp9FjGp0iPi +qYxtVH24gj1iNUSiJK9DY12/+sm9mK7XtKD4CpQQlDqyIA360+YWNvLKVkLB +YrHYw+Q+MMs72x0LvBAQ \ No newline at end of file diff --git a/cookbooks/nginx/files/etc/lego/kazu634_run.sh b/cookbooks/nginx/files/etc/lego/kazu634_run.sh new file mode 100644 index 0000000..eee7583 --- /dev/null +++ b/cookbooks/nginx/files/etc/lego/kazu634_run.sh @@ -0,0 +1,8 @@ +md5:3cf701078e846bb3b9e4aaeffb13301f:salt:44-166-248-61-197-238-11-81:aes-256-cfb:+oFyTbNKbbobipRhZRSLa1cbV76YiIcc/NTdhDwYnd+NiteyIFmijoyXfMLR +B2g75UAED/gFLtRnhM9vg8BVAHkJqLr14zQydLRNQxkB17mXTrxRY+9txHWN +2QZfvi9m67Kfjle81EdGVnz2WkYG/VHfUoxwEhdGYfny41/KGDFDL8368Wzo +Ytaq5fcvWRdB71XJLvUW0/2ShecuMcZi2QwvEJWRSA+RzY8JcD4rM6BwR87x ++p57nSgzEp1nHk6Z8wiIcPAqpbk1Ax2xXJ0OoGtA3FJQ6aD9gyqVIF6F7m30 +sJRZAwULi7on+Ph6S5bR70JSKBepMWzei/vZ8bsm2lBiGw3XgQjYE3cRlndY +nSpEhPPA3zl9H9hfZMV7EKEAlKX+tbMJDEXDugmCzAbtBI5lIHbjfOeWu2jW +BizhmJJYUcc/zg== \ No newline at end of file diff --git a/cookbooks/nginx/lego.rb b/cookbooks/nginx/lego.rb index 64d4cd8..7e903af 100644 --- a/cookbooks/nginx/lego.rb +++ b/cookbooks/nginx/lego.rb @@ -78,18 +78,19 @@ directory "#{LEGO_STORAGE}" do mode '755' end -encrypted_remote_file "#{LEGO_STORAGE}/lego_run.sh" do - owner 'root' - group 'root' - mode '500' - source "files/#{LEGO_STORAGE}/lego_run.sh" - password ENV['ITAMAE_PASSWORD'] -end +%w( kazu634 everun ).each do |domain| + encrypted_remote_file "#{LEGO_STORAGE}/#{domain}_run.sh" do + owner 'root' + group 'root' + mode '500' + source "files/#{LEGO_STORAGE}/#{domain}_run.sh" + password ENV['ITAMAE_PASSWORD'] + end -execute "#{LEGO_STORAGE}/lego_run.sh" do - user 'root' - cwd LEGO_STORAGE - not_if "test -d #{LEGO_STORAGE}/.lego" + execute "#{LEGO_STORAGE}/#{domain}_run.sh" do + user 'root' + cwd LEGO_STORAGE + end end encrypted_remote_file '/etc/cron.d/lego' do