diff --git a/README.md b/README.md index 5316239..b7f2cc9 100755 --- a/README.md +++ b/README.md @@ -22,3 +22,7 @@ GDBM is the default one. LMDB needs to have created directory for database files `./db_convert --src access.db --dest lmdb --lmdb` * Your new file with converted database will be created + +### Example systemd service +The directory `units` contains example of the service file. It could be used as template +for database conversion within system upgrade. diff --git a/units/libdb-convert.service b/units/libdb-convert.service new file mode 100644 index 0000000..46667b1 --- /dev/null +++ b/units/libdb-convert.service @@ -0,0 +1,13 @@ +[Unit] +Description=Convert libdb(BerkeleyDB) database +After=local-fs.target +ConditionPathExists=/etc/vsftpd/example +ConditionPathExists=!/etc/vsftpd/example.gdbm + +[Service] +Type=oneshot +ExecStart=/usr/bin/db_converter --src example --dest example.gdbm +RemainAfterExit=true + +[Install] +WantedBy=default.target