add: systemd service
All checks were successful
Lint / Lint (push) Successful in 14s

This commit is contained in:
洛天依 2025-01-20 02:54:23 +00:00
parent f17345dae8
commit 6d158530c3
Signed by: luo
SSH Key Fingerprint: SHA256:V1KdsvGUpiKVfrJo1oHrAPnc/Z6k/6xgaZN7iTbYBl4
3 changed files with 22 additions and 0 deletions

View File

@ -20,6 +20,12 @@ git clone https://devops.lty.name/luo/backupd.git /opt/backupd
```
## Configuration
>
> **Note**
>
> You have to complete ALL FOLLOWING STEPS to make the script work properly.
>
**Ownership**
Don't forget to change the ownership of the directory:

7
backupd.service Normal file
View File

@ -0,0 +1,7 @@
[Unit]
Description=A simple backup script
After=network-online.target
[Service]
Type=oneshot
ExecStart=/opt/backupd/backupd

9
backupd.timer Normal file
View File

@ -0,0 +1,9 @@
[Unit]
Description=Run backupd daily
[Timer]
OnCalendar=*-*-* 09:00:00 UTC
Persistent=true
[Install]
WantedBy=timers.target