diff options
author | Dennis Eriksen <d@ennis.no> | 2020-01-19 20:39:49 +0100 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2020-01-19 20:39:49 +0100 |
commit | 9907b46a6be804d4916af03d59826b8bbaf8c09f (patch) | |
tree | f22bb506da0c8464384551c52879523f22410f98 /mkosi.extra | |
download | mkosi-ffsync-9907b46a6be804d4916af03d59826b8bbaf8c09f.tar.gz |
Initial commit
Diffstat (limited to 'mkosi.extra')
-rw-r--r-- | mkosi.extra/etc/apt/apt.conf.d/20auto-upgrades | 9 | ||||
-rw-r--r-- | mkosi.extra/etc/apt/apt.conf.d/50unattended-upgrades | 34 | ||||
-rw-r--r-- | mkosi.extra/etc/systemd/system/ffsync.service | 24 |
3 files changed, 67 insertions, 0 deletions
diff --git a/mkosi.extra/etc/apt/apt.conf.d/20auto-upgrades b/mkosi.extra/etc/apt/apt.conf.d/20auto-upgrades new file mode 100644 index 0000000..4c725ab --- /dev/null +++ b/mkosi.extra/etc/apt/apt.conf.d/20auto-upgrades @@ -0,0 +1,9 @@ +APT::Periodic::Unattended-Upgrade "1"; + +APT::Periodic::Update-Package-Lists "1"; + + +APT::Periodic::AutocleanInterval "7"; + + + diff --git a/mkosi.extra/etc/apt/apt.conf.d/50unattended-upgrades b/mkosi.extra/etc/apt/apt.conf.d/50unattended-upgrades new file mode 100644 index 0000000..768347b --- /dev/null +++ b/mkosi.extra/etc/apt/apt.conf.d/50unattended-upgrades @@ -0,0 +1,34 @@ +// Unattended-Upgrade::Origins-Pattern controls which packages are +// upgraded. +Unattended-Upgrade::Origins-Pattern { + "origin=Ubuntu,archive=${distro_codename}-security"; + "o=Ubuntu,a=${distro_codename}"; + "o=Ubuntu,a=${distro_codename}-updates"; + "o=Ubuntu,a=${distro_codename}-proposed-updates"; + "o=Ubuntu,n=${distro_codename}-backports"; + }; + +// List of packages to not update (regexp are supported) +Unattended-Upgrade::Package-Blacklist { +}; + + +// Split the upgrade into the smallest possible chunks so that +// they can be interrupted with SIGUSR1. This makes the upgrade +// a bit slower but it has the benefit that shutdown while a upgrade +// is running is possible (with a small delay) +Unattended-Upgrade::MinimalSteps "true"; + + +// Do automatic removal of new unused dependencies after the upgrade +// (equivalent to apt-get autoremove) +Unattended-Upgrade::Remove-Unused-Dependencies "true"; + + +// Do upgrade application even if it requires restart after upgrade +// I.e. "XB-Upgrade-Requires: app-restart" is set in the debian/control file +Unattended-Upgrade::IgnoreAppsRequireRestart "true"; + +// Automatically run "dpkg --force-confold --configure -a". +Unattended-Upgrade::AutoFixInterruptedDpkg "true"; + diff --git a/mkosi.extra/etc/systemd/system/ffsync.service b/mkosi.extra/etc/systemd/system/ffsync.service new file mode 100644 index 0000000..d1ede04 --- /dev/null +++ b/mkosi.extra/etc/systemd/system/ffsync.service @@ -0,0 +1,24 @@ +[Unit] +Description=ffsync +Requires=network.target +After=network.target + +Type=simple +[Service] +ExecStart=/app/local/bin/gunicorn --paste /ffsync/syncserver.ini +SyslogIdentifier=ffsync +PrivateTmp=true +ProtectSystem=strict +ProtectHome=true +ProtectKernelTunables=true +ProtectControlGroups=true +ProtectKernelModules=true +InaccessiblePaths=/etc /home /opt /srv /var/local /var/mail +RemoveIPC=true +User=app +Group=app +WorkingDirectory=/data +#Restart=on-failure + +[Install] +WantedBy=multi-user.target |