diff --git a/README.md b/README.md index c05bd4b..6a7788e 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ path_to_log. 5. Остановите работу демона ``` -systemctl kill -s 2 BackupPJ.service +systemctl stop BackupPJ.service ``` Таким образом демон остановится по сигналу SIGINT без утечек памяти. @@ -96,7 +96,7 @@ path_to_log. 5. Stop the daemon ``` -systemctl kill -s 2 BackupPJ.service +systemctl stop 2 BackupPJ.service ``` This way the daemon will stop on SIGINT signal without memory leaks. diff --git a/bin/backupd b/bin/backupd deleted file mode 100755 index 0bd4a94..0000000 Binary files a/bin/backupd and /dev/null differ diff --git a/config.conf b/config.conf index 8ff28fe..a92caf2 100644 --- a/config.conf +++ b/config.conf @@ -1,3 +1,3 @@ -path_to_dir: /home/k1rch/Music -path_to_backup: /home/k1rch/2023-backupd-backups -path_to_log: /home/k1rch/backup_service.log \ No newline at end of file +path_to_dir: /home/k1r4/Music +path_to_backup: /home/k1r4/2023-backupd-backups +path_to_log: /home/k1r4/2023-backupd-backups/backup_service.log diff --git a/integration.sh b/integration.sh index f9eb427..5fc50e2 100644 --- a/integration.sh +++ b/integration.sh @@ -13,7 +13,10 @@ echo "WorkingDirectory=$PWD/bin" >> BackupPJ.service # all logs written to stderr will be written to this file: backupd.errors.log # check ENABLE_DEBUG_INFO for this purpose! echo "ExecStart=/bin/bash -ce \"./backupd 2> ../backupd.errors.log\"" >> BackupPJ.service +echo "ExecReload=/bin/bash -ce \"kill -s 2 `cat /run/backupd_pj.pid`\"\n" >> BackupPJ.service + echo "[Install]" >> BackupPJ.service echo "WantedBy=multi-user.target" >> BackupPJ.service + sudo mv BackupPJ.service -t /etc/systemd/system/