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

Make script_base_path configurable for allow run script in user space (from home folder) #128

Open MurzNN opened 4 years ago

MurzNN commented 4 years ago

I searching backup script that can be downloaded and run in user space (as regular user in home folder on any Linux system). Seems glsysbackup is good solution with option:

root_privileges_required="0"

But the problem is that script_base_path, lock and log folders are hard-coded:

        script_base_path="/usr/local/${script_name}"
        script_bin_directory="${script_base_path}/bin"
        script_lock_directory="${script_base_path}/var/lock"
        script_log_directory="${script_base_path}/var/log"

Can you please make them configurable via config file? Also can you please describe, which other potential problems can be happens when using your script in user space?

MurzNN commented 4 years ago

Also will be good to customize backup_base_directory location, how it hardcoded as:

backup_base_directory="${backup_destination_path}/${HOSTNAME}/${script_config_name}"

but for regular users ${HOSTNAME}/${script_config_name} are not needed.

ccztux commented 3 years ago

I searching backup script that can be downloaded and run in user space (as regular user in home folder on any Linux system). Seems glsysbackup is good solution with option:

root_privileges_required="0"

But the problem is that script_base_path, lock and log folders are hard-coded:

        script_base_path="/usr/local/${script_name}"
        script_bin_directory="${script_base_path}/bin"
        script_lock_directory="${script_base_path}/var/lock"
        script_log_directory="${script_base_path}/var/log"

Can you please make them configurable via config file? Also can you please describe, which other potential problems can be happens when using your script in user space?

I am not sure, if i understood you correctly. What do you need that for? A possible solution could be to:

An advantige of this solution is, that you have only one version of the original glsysbackup script. Each user has its own config file.

ccztux commented 3 years ago

Also will be good to customize backup_base_directory location, how it hardcoded as:

backup_base_directory="${backup_destination_path}/${HOSTNAME}/${script_config_name}"

but for regular users ${HOSTNAME}/${script_config_name} are not needed.

I have to think about it and let you know as far as i know how to deal with that.