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

fix: jans-linux-setup backup cli direcory if any #976

Merged
merged 1 commit into from
Mar 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import re
import configparser
import tarfile
import shutil
import shutil
import time

from setup_app import paths
from setup_app.utils import base
Expand Down Expand Up @@ -47,6 +48,10 @@ def install(self):

self.logIt("Installing Jans Cli", pbar=self.service_name)

# backup if exists
if os.path.exists(self.jans_cli_install_dir):
self.run(['mv', '-f', self.jans_cli_install_dir, self.jans_cli_install_dir+'_backup-{}'.format(time.ctime())])

#extract jans-cli tgz archieve
base.extract_from_zip(self.source_files[0][0], 'jans-cli/cli', self.jans_cli_install_dir)

Expand Down