diff options
Diffstat (limited to 'misc-utils/lastlog2-import.service.in')
-rw-r--r-- | misc-utils/lastlog2-import.service.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/misc-utils/lastlog2-import.service.in b/misc-utils/lastlog2-import.service.in new file mode 100644 index 0000000..c57a897 --- /dev/null +++ b/misc-utils/lastlog2-import.service.in @@ -0,0 +1,15 @@ +[Unit] +Description=Import lastlog data into lastlog2 database +Documentation=man:lastlog2(8) +After=local-fs.target +ConditionPathExists=/var/log/lastlog +ConditionPathExists=!/var/lib/lastlog/lastlog2.db + +[Service] +Type=oneshot +ExecStart=@usrbin_execdir@/lastlog2 --import /var/log/lastlog +ExecStartPost=/usr/bin/mv /var/log/lastlog /var/log/lastlog.migrated +RemainAfterExit=true + +[Install] +WantedBy=default.target |