Skip to content

Commit

Permalink
Update ramdisk.service
Browse files Browse the repository at this point in the history
  • Loading branch information
rmens authored Feb 28, 2024
1 parent 901aae8 commit 64ced97
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ramdisk.service
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
[Unit]
Description=RAM disk for encoder logs
After=local-fs.target

[Service]
Type=oneshot
ExecStartPre=/bin/mkdir -p /mnt/ramdisk
ExecStart=/bin/mount -t tmpfs -o size=100m tmpfs /mnt/ramdisk
ExecStop=/bin/umount /mnt/ramdisk
ExecStartPre=-/bin/mkdir -p /mnt/ramdisk /var/ramdisk_backup/
ExecStart=-/bin/mount -t tmpfs -o size=100m tmpfs /mnt/ramdisk
ExecStartPost=-/usr/bin/rsync -a /var/ramdisk_backup/ /mnt/ramdisk/
ExecStop=-/usr/bin/rsync -a /mnt/ramdisk/ /var/ramdisk_backup/
ExecStopPost=-/bin/umount /mnt/ramdisk
RemainAfterExit=yes

[Install]
Expand Down

0 comments on commit 64ced97

Please sign in to comment.