ccztux / glsysbackup

:floppy_disk: glsysbackup is a feature rich (rotation, logging, encryption, renice, re-ionice,...etc.) bash backup script
GNU General Public License v3.0
12 stars 2 forks source link

Wrong pids of running processes #108

Closed ccztux closed 4 years ago

ccztux commented 4 years ago

One process is running:

18:55:00 [root@localhost]:~# ps aux | grep 284
root     19542  0.0  0.0 112672  1068 pts/0    S+   18:55   0:00 grep --color=auto 284
root     28464  0.0  0.0 113668  2188 pts/0    T    18:50   0:00 bash /usr/local/glsysbackup/bin/glsysbackup -c /usr/local/glsysbackup/etc/usr04www.conf

Wrong pids in logfile:

18:55:12 [root@localhost]:~# /usr/local/glsysbackup/bin/glsysbackup -c /usr/local/glsysbackup/etc/usr04www.conf
2019-11-16 18:55:14 |  19545 |    checkLogHandlerRequirements | glsysbackup 2.0.0-beta4 starting... (PID=19545)
2019-11-16 18:55:14 |  19545 |    checkLogHandlerRequirements | We are using config file: '/usr/local/glsysbackup/etc/usr04www.conf'.
2019-11-16 18:55:14 |  19545 |            checkRootPrivileges | Check if root priviliges are required...
2019-11-16 18:55:14 |  19545 |            checkRootPrivileges | Root privileges are required, checking privileges...
2019-11-16 18:55:14 |  19545 |            checkRootPrivileges | HOORAY, we have root privileges. :)
2019-11-16 18:55:14 |  19545 |                        getUser | Get user which starts the script...
2019-11-16 18:55:14 |  19545 |                        getUser | glsysbackup was started by user: 'root'.
2019-11-16 18:55:14 |  19545 |               checkBashVersion | Checking bash version...
2019-11-16 18:55:14 |  19545 |               checkBashVersion | Bash version: '4' meets requirements.
2019-11-16 18:55:14 |  19545 |    checkAlreadyRunningInstance | Check if another instance of: 'glsysbackup' is already running...
2019-11-16 18:55:14 |  19545 |                      checkLock | Check if lock file: '/usr/local/glsysbackup/var/lock/glsysbackup.usr04www.lock' exists and if it is read and writeable...
2019-11-16 18:55:14 |  19545 |                      checkLock | Lock file exists and it is read/writeable.
2019-11-16 18:55:14 |  19545 |    checkAlreadyRunningInstance | Another instance of: 'glsysbackup' is currently running (Lockfile: '/usr/local/glsysbackup/var/lock/glsysbackup.usr04www.lock' and the following, running processes: ', 284' detected).
2019-11-16 18:55:14 |  19545 |                  signalHandler | Caught: 'EXIT', exiting script...
2019-11-16 18:55:14 |  19545 |                  signalHandler | Ooops!!! Something went wrong. :(
2019-11-16 18:55:14 |  19545 |                  signalHandler | Read the log or output to determine what exactly went wrong.
2019-11-16 18:55:14 |  19545 |                  signalHandler | glsysbackup (2.0.0-beta4) was running: '0' seconds, script_exit_code: '100'.
2019-11-16 18:55:14 |  19545 |                  signalHandler | Bye, bye...

The last two digits of the pids get lost.