Optimierungen
This commit is contained in:
@@ -4,7 +4,7 @@ After=network.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
Environment="PARTUUID=7b2d5cb6-01" "MOUNTPOINT=/mnt/backup" "SOURCE=/home"
|
Environment="MOUNTPOINT=/mnt/backup" "SOURCE=/home"
|
||||||
ExecStart=/usr/local/bin/autobackup.sh
|
ExecStart=/usr/local/bin/autobackup.sh
|
||||||
StandardOutput=append:/var/log/autobackup.log
|
StandardOutput=append:/var/log/autobackup.log
|
||||||
StandardError=append:/var/log/autobackup_error.log
|
StandardError=append:/var/log/autobackup_error.log
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#! /usr/bin/bash
|
#! /usr/bin/bash
|
||||||
|
|
||||||
echo "mounting ${PARTUUID} to ${MOUNTPOINT}"
|
echo "mounting ${MOUNTPOINT}"
|
||||||
mount -t ext4 PARTUUID="${PARTUUID}" ${MOUNTPOINT}
|
mount ${MOUNTPOINT}
|
||||||
|
|
||||||
if ! mountpoint -q ${MOUNTPOINT} ; then
|
if ! mountpoint -q ${MOUNTPOINT} ; then
|
||||||
echo "Backup Stick not mounted" >&2
|
echo "Backup Stick not mounted" >&2
|
||||||
|
|||||||
Reference in New Issue
Block a user