Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MurzNN opened this issue Feb 14, 2020 · 3 comments

Comments

@MurzNN
Copy link

MurzNN commented Feb 14, 2020

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 MurzNN changed the title Make lock and log directories configurable for allow run script in user space Make script_base_path configurable for allow run script in user space (from home folder) Feb 14, 2020
@MurzNN
Copy link
Author

MurzNN commented Feb 14, 2020

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
Copy link
Owner

ccztux commented Dec 30, 2020

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:

  • add a symlink in each home directory of the users to /usr/local/glsysbackup/bin/glsysbackup
  • copy a sample config file in each home directory.
  • the user can make the configuration in their file and trigger glsysbackup via ./glsysbackup -c user.conf

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
Copy link
Owner

ccztux commented Dec 30, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants