From 50d0af489296a42f8773066ffc37265dab1d5b0a Mon Sep 17 00:00:00 2001 From: Joshua Hull Date: Sun, 15 Jan 2023 10:49:21 +0100 Subject: sky: homepage: set up the frontpage of labitat.dk esmil: - use timer to update the homepage - git clone/update and install gems as the homepage user --- roles/sky/files/update-homepage.service | 13 +++++++++++++ roles/sky/files/update-homepage.timer | 12 ++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 roles/sky/files/update-homepage.service create mode 100644 roles/sky/files/update-homepage.timer (limited to 'roles/sky/files') diff --git a/roles/sky/files/update-homepage.service b/roles/sky/files/update-homepage.service new file mode 100644 index 0000000..d4fc777 --- /dev/null +++ b/roles/sky/files/update-homepage.service @@ -0,0 +1,13 @@ +[Unit] +Description=Update Homepage +Requires=network-online.target +After=network-online.target + +[Service] +Type=oneshot +ExecStart=/home/homepage/homepage/make +WorkingDirectory=/home/homepage/homepage +User=homepage +Group=homepage +ProtectSystem=full +PrivateTmp=yes diff --git a/roles/sky/files/update-homepage.timer b/roles/sky/files/update-homepage.timer new file mode 100644 index 0000000..34a6a57 --- /dev/null +++ b/roles/sky/files/update-homepage.timer @@ -0,0 +1,12 @@ +[Unit] +Description=Update homepage every minute + +[Timer] +Unit=update-homepage.service +OnBootSec=1min +OnUnitActiveSec=1min +AccuracySec=1min +Persistent=no + +[Install] +WantedBy=timers.target -- cgit v1.2.1