Compare commits

..

4 Commits

Author SHA1 Message Date
Greg Karekinian
0cae8dca69 Set the email sender in unattended-upgrades config
Mailgun was rejecting the email as it did not have a valid sender
(the default, which is something like root@akkounts-1). Unattended
upgrades have been working properly, now we will start getting emails
next time an upgrade is done on akkounts-1.
2025-07-15 10:12:02 +02:00
Greg Karekinian
68df49037c Merge remote-tracking branch 'origin/master' into bugfix/499-unattended_upgrades 2025-06-16 16:05:35 +02:00
Greg Karekinian
773950b9a5 Always send an email on unattended-upgrades 2025-05-31 17:00:07 +02:00
Greg Karekinian
f39a1ed250 Enable unattended-upgrades
We were missing a positive value on
`["apt"]["unattended_upgrades"]["enable"]` to enable it.

Refs #499
2025-05-31 16:44:01 +02:00
3 changed files with 4 additions and 19 deletions

View File

@ -1,15 +0,0 @@
# Mastodon
Running on kosmos.social
## Ops
### Enable maintance mode
Return a 503 and maintance page for all requests:
knife ssh -p2222 -a knife_zero.host "role:openresty_proxy" "sudo cp -p /var/www/maintenance.html /var/www/kosmos.social/public/ && sudo systemctl reload openresty"
### Stop maintenance mode
knife ssh -p2222 -a knife_zero.host "role:openresty_proxy" "sudo rm /var/www/kosmos.social/public/maintenance.html && sudo systemctl reload openresty"

View File

@ -30,6 +30,9 @@ include_recipe 'ntp'
include_recipe 'kosmos-base::journald_conf' include_recipe 'kosmos-base::journald_conf'
include_recipe 'kosmos-base::systemd_emails' include_recipe 'kosmos-base::systemd_emails'
node.override["apt"]["unattended_upgrades"]["enable"] = true
node.override["apt"]["unattended_upgrades"]["mail_only_on_error"] = false
node.override["apt"]["unattended_upgrades"]["sender"] = "ops@kosmos.org"
node.override["apt"]["unattended_upgrades"]["allowed_origins"] = [ node.override["apt"]["unattended_upgrades"]["allowed_origins"] = [
"${distro_id}:${distro_codename}-security", "${distro_id}:${distro_codename}-security",
"${distro_id}:${distro_codename}-updates" "${distro_id}:${distro_codename}-updates"

View File

@ -21,7 +21,6 @@ bash 'build_btcpay' do
systemctl stop btcpayserver.service systemctl stop btcpayserver.service
./build.sh ./build.sh
EOH EOH
environment "DOTNET_CLI_TELEMETRY_OPTOUT" => 1
action :nothing action :nothing
notifies :restart, "service[btcpayserver]", :delayed notifies :restart, "service[btcpayserver]", :delayed
end end
@ -88,7 +87,7 @@ systemd_unit 'btcpayserver.service' do
Group: node['bitcoin']['usergroup'], Group: node['bitcoin']['usergroup'],
Type: 'simple', Type: 'simple',
WorkingDirectory: node['btcpay']['source_dir'], WorkingDirectory: node['btcpay']['source_dir'],
Environment: "'BTCPAY_EXPLORERPOSTGRES=#{nbxpg_connect}' 'DOTNET_CLI_TELEMETRY_OPTOUT=1'", Environment: defined?(nbxpg_connect) ? "'BTCPAY_EXPLORERPOSTGRES=#{nbxpg_connect}'" : '',
ExecStart: "#{node['btcpay']['source_dir']}/run.sh --conf=#{node['btcpay']['config_path']}", ExecStart: "#{node['btcpay']['source_dir']}/run.sh --conf=#{node['btcpay']['config_path']}",
PIDFile: '/run/btcpayserver/btcpayserver.pid', PIDFile: '/run/btcpayserver/btcpayserver.pid',
Restart: 'on-failure', Restart: 'on-failure',
@ -104,8 +103,6 @@ systemd_unit 'btcpayserver.service' do
verify false verify false
triggers_reload true triggers_reload true
action [:create] action [:create]
# reload is not applicable
notifies :restart, "service[btcpayserver]", :delayed
end end
service "btcpayserver" do service "btcpayserver" do