diff --git a/image/pro_seafile_7.1/Dockerfile b/image/pro_seafile_7.1/Dockerfile index b918506..90766fc 100644 --- a/image/pro_seafile_7.1/Dockerfile +++ b/image/pro_seafile_7.1/Dockerfile @@ -5,7 +5,7 @@ FROM phusion/baseimage:0.11 RUN apt-get update --fix-missing # Utility tools -RUN apt-get install -y vim htop net-tools psmisc wget curl +RUN apt-get install -y vim htop net-tools psmisc wget curl git # For suport set local time zone. RUN export DEBIAN_FRONTEND=noninteractive && apt-get install tzdata -y diff --git a/image/seafile_7.1/Dockerfile b/image/seafile_7.1/Dockerfile index bdf6592..d21b899 100644 --- a/image/seafile_7.1/Dockerfile +++ b/image/seafile_7.1/Dockerfile @@ -5,7 +5,7 @@ FROM phusion/baseimage:0.11 RUN apt-get update --fix-missing # Utility tools -RUN apt-get install -y vim htop net-tools psmisc wget curl +RUN apt-get install -y vim htop net-tools psmisc wget curl git # For suport set local time zone. RUN export DEBIAN_FRONTEND=noninteractive && apt-get install tzdata -y diff --git a/scripts_7.1/auto_renew_crt.sh b/scripts_7.1/auto_renew_crt.sh index 5d16aca..67291aa 100755 --- a/scripts_7.1/auto_renew_crt.sh +++ b/scripts_7.1/auto_renew_crt.sh @@ -16,7 +16,7 @@ renew_cert_script=/scripts/renew_cert.sh if [[ ! -x ${renew_cert_script} ]]; then cat > ${renew_cert_script} << EOF #!/bin/bash -python ${letsencrypt_script} --account-key ${ssldir}/${ssl_account_key} --csr ${ssldir}/${ssl_csr} --acme-dir /var/www/challenges/ > ${ssldir}/${ssl_crt} || exit +python3 ${letsencrypt_script} --account-key ${ssldir}/${ssl_account_key} --csr ${ssldir}/${ssl_csr} --acme-dir /var/www/challenges/ > ${ssldir}/${ssl_crt} || exit $(which nginx) -s reload EOF diff --git a/scripts_7.1/ssl.sh b/scripts_7.1/ssl.sh index 3f53bd9..e9ec8d4 100755 --- a/scripts_7.1/ssl.sh +++ b/scripts_7.1/ssl.sh @@ -37,7 +37,7 @@ if [[ ! -e ${ssl_csr} ]]; then openssl req -new -sha256 -key ${ssl_key} -subj "/CN=$domain" > $ssl_csr fi -python $letsencrypt_script --account-key ${ssl_account_key} --csr $ssl_csr --acme-dir /var/www/challenges/ > ./signed.crt +python3 $letsencrypt_script --account-key ${ssl_account_key} --csr $ssl_csr --acme-dir /var/www/challenges/ > ./signed.crt curl -sSL -o intermediate.pem https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem cat signed.crt intermediate.pem > ${ssl_crt} diff --git a/scripts_7.1/utils/__init__.py b/scripts_7.1/utils/__init__.py index 5a92d56..5532c49 100644 --- a/scripts_7.1/utils/__init__.py +++ b/scripts_7.1/utils/__init__.py @@ -144,7 +144,7 @@ def get_process_cmd(pid, env=False): env = 'e' if env else '' try: return subprocess.check_output('ps {} -o command {}'.format(env, pid), - shell=True).strip().splitlines()[1] + shell=True).decode('utf8').strip().splitlines()[1] # except Exception, e: # print(e) except: @@ -153,7 +153,7 @@ def get_process_cmd(pid, env=False): def get_match_pids(pattern): pgrep_output = subprocess.check_output( 'pgrep -f "{}" || true'.format(pattern), - shell=True).strip() + shell=True).decode('utf8').strip() return [int(pid) for pid in pgrep_output.splitlines()] def ask_for_confirm(msg): @@ -171,7 +171,7 @@ def git_current_commit(): def get_command_output(cmd): shell = not isinstance(cmd, list) - return subprocess.check_output(cmd, shell=shell) + return subprocess.check_output(cmd, shell=shell).decode('utf8') def ask_yes_or_no(msg, prompt='', default=None): print('\n' + msg + '\n')