[UPD] format and update license
This commit is contained in:
parent
f4dec8a73a
commit
c1b9a5fee4
50 changed files with 169 additions and 139 deletions
|
|
@ -1,29 +1,34 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
from os import listdir
|
|
||||||
from os.path import isdir, join, abspath
|
|
||||||
|
|
||||||
import configparser
|
import configparser
|
||||||
|
from os import listdir
|
||||||
|
from os.path import abspath, isdir, join
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(prog='Configure base dir for all addons')
|
parser = argparse.ArgumentParser(prog="Configure base dir for all addons")
|
||||||
|
|
||||||
parser.add_argument("addonsBaseDir", help="Path where addons are cloned.")
|
parser.add_argument("addonsBaseDir", help="Path where addons are cloned.")
|
||||||
parser.add_argument("srcConfigPath",
|
parser.add_argument(
|
||||||
help="Path where we retrieve source config file to adapt with new "
|
"srcConfigPath",
|
||||||
"addons path.")
|
help="Path where we retrieve source config file to adapt with new "
|
||||||
parser.add_argument("dstConfigPath", help="Path to save adapted configuration.")
|
"addons path.",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"dstConfigPath", help="Path to save adapted configuration."
|
||||||
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
addonsBaseDir = args.addonsBaseDir
|
addonsBaseDir = args.addonsBaseDir
|
||||||
srcConfigPath = args.srcConfigPath
|
srcConfigPath = args.srcConfigPath
|
||||||
dstConfigPath = args.dstConfigPath
|
dstConfigPath = args.dstConfigPath
|
||||||
|
|
||||||
addonsDirs = [abspath(join(addonsBaseDir, f)) for f in listdir(addonsBaseDir) if
|
addonsDirs = [
|
||||||
isdir(join(addonsBaseDir, f))]
|
abspath(join(addonsBaseDir, f))
|
||||||
|
for f in listdir(addonsBaseDir)
|
||||||
|
if isdir(join(addonsBaseDir, f))
|
||||||
|
]
|
||||||
|
|
||||||
with open(".odoo-version", "r") as f:
|
with open(".odoo-version", "r") as f:
|
||||||
odoo_version = f.readline().strip()
|
odoo_version = f.readline().strip()
|
||||||
|
|
@ -39,9 +44,9 @@ config.read(srcConfigPath)
|
||||||
|
|
||||||
separator = ","
|
separator = ","
|
||||||
|
|
||||||
config.set('options', 'addons_path', separator.join(addonsDirs))
|
config.set("options", "addons_path", separator.join(addonsDirs))
|
||||||
|
|
||||||
print(config.get('options', 'addons_path'))
|
print(config.get("options", "addons_path"))
|
||||||
|
|
||||||
with open(dstConfigPath, 'w') as configfile:
|
with open(dstConfigPath, "w") as configfile:
|
||||||
config.write(configfile)
|
config.write(configfile)
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,21 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import psycopg2
|
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
if __name__ == '__main__':
|
import psycopg2
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
arg_parser = argparse.ArgumentParser()
|
arg_parser = argparse.ArgumentParser()
|
||||||
arg_parser.add_argument('--db_host', required=True)
|
arg_parser.add_argument("--db_host", required=True)
|
||||||
arg_parser.add_argument('--db_port', required=True)
|
arg_parser.add_argument("--db_port", required=True)
|
||||||
arg_parser.add_argument('--db_user', required=True)
|
arg_parser.add_argument("--db_user", required=True)
|
||||||
arg_parser.add_argument('--db_password', required=True)
|
arg_parser.add_argument("--db_password", required=True)
|
||||||
arg_parser.add_argument('--db_name', required=False, default="postgres")
|
arg_parser.add_argument("--db_name", required=False, default="postgres")
|
||||||
arg_parser.add_argument('--timeout', type=int, default=10)
|
arg_parser.add_argument("--timeout", type=int, default=10)
|
||||||
|
|
||||||
args = arg_parser.parse_args()
|
args = arg_parser.parse_args()
|
||||||
|
|
||||||
|
|
@ -22,12 +23,16 @@ if __name__ == '__main__':
|
||||||
print("Try connection to postgres...")
|
print("Try connection to postgres...")
|
||||||
|
|
||||||
connected = False
|
connected = False
|
||||||
error = ''
|
error = ""
|
||||||
while ((time.time() - start_time) < args.timeout) or connected is True:
|
while ((time.time() - start_time) < args.timeout) or connected is True:
|
||||||
try:
|
try:
|
||||||
conn = psycopg2.connect(user=args.db_user, host=args.db_host,
|
conn = psycopg2.connect(
|
||||||
port=args.db_port, password=args.db_password,
|
user=args.db_user,
|
||||||
dbname=args.db_name)
|
host=args.db_host,
|
||||||
|
port=args.db_port,
|
||||||
|
password=args.db_password,
|
||||||
|
dbname=args.db_name,
|
||||||
|
)
|
||||||
break
|
break
|
||||||
except psycopg2.OperationalError as e:
|
except psycopg2.OperationalError as e:
|
||||||
error = e
|
error = e
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
@ -14,7 +14,6 @@ import uuid
|
||||||
from git import Repo
|
from git import Repo
|
||||||
from git.exc import InvalidGitRepositoryError, NoSuchPathError
|
from git.exc import InvalidGitRepositoryError, NoSuchPathError
|
||||||
|
|
||||||
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
format=(
|
format=(
|
||||||
"%(asctime)s,%(msecs)d %(levelname)-8s [%(filename)s:%(lineno)d]"
|
"%(asctime)s,%(msecs)d %(levelname)-8s [%(filename)s:%(lineno)d]"
|
||||||
|
|
@ -383,10 +382,7 @@ class ProjectManagement:
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
if not self.keep_bd_alive:
|
if not self.keep_bd_alive:
|
||||||
cmd = (
|
cmd = "./odoo_bin.sh db --drop --database" f" {bd_name_demo}"
|
||||||
"./odoo_bin.sh db --drop --database"
|
|
||||||
f" {bd_name_demo}"
|
|
||||||
)
|
|
||||||
_logger.info(cmd)
|
_logger.info(cmd)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
|
|
@ -467,10 +463,7 @@ class ProjectManagement:
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
if not self.keep_bd_alive:
|
if not self.keep_bd_alive:
|
||||||
cmd = (
|
cmd = "./odoo_bin.sh db --drop --database" f" {bd_name_template}"
|
||||||
"./odoo_bin.sh db --drop --database"
|
|
||||||
f" {bd_name_template}"
|
|
||||||
)
|
|
||||||
_logger.info(cmd)
|
_logger.info(cmd)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
|
|
@ -538,10 +531,7 @@ class ProjectManagement:
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
if not self.keep_bd_alive:
|
if not self.keep_bd_alive:
|
||||||
cmd = (
|
cmd = "./odoo_bin.sh db --drop --database" f" {bd_name_generator}"
|
||||||
"./odoo_bin.sh db --drop --database"
|
|
||||||
f" {bd_name_generator}"
|
|
||||||
)
|
|
||||||
_logger.info(cmd)
|
_logger.info(cmd)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,40 +1,48 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
print("This script only work with localhost:8069, not working with remote instance.")
|
print(
|
||||||
|
"This script only work with localhost:8069, not working with remote instance."
|
||||||
|
)
|
||||||
|
|
||||||
import requests
|
|
||||||
import sys
|
|
||||||
import logging
|
import logging
|
||||||
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
ODOO_URL = '' # Your Odoo server URL
|
import requests
|
||||||
DATABASE_NAME = ''
|
|
||||||
MASTER_PASSWORD = ''
|
ODOO_URL = "" # Your Odoo server URL
|
||||||
|
DATABASE_NAME = ""
|
||||||
|
MASTER_PASSWORD = ""
|
||||||
# BACKUP_FORMAT = env('BACKUP_FORMAT', default='zip') # 'zip' or 'dump'
|
# BACKUP_FORMAT = env('BACKUP_FORMAT', default='zip') # 'zip' or 'dump'
|
||||||
BACKUP_FORMAT = 'zip' # 'zip' or 'dump'
|
BACKUP_FORMAT = "zip" # 'zip' or 'dump'
|
||||||
OUTPUT_FILE_NAME = f'{DATABASE_NAME}_backup.{BACKUP_FORMAT}'
|
OUTPUT_FILE_NAME = f"{DATABASE_NAME}_backup.{BACKUP_FORMAT}"
|
||||||
|
|
||||||
# --- Logger Setup ---
|
# --- Logger Setup ---
|
||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
# TODO not working with remote, only localhost
|
# TODO not working with remote, only localhost
|
||||||
logger.error("This script is not working with remote instance, only http://127.0.0.1:8069")
|
logger.error(
|
||||||
|
"This script is not working with remote instance, only http://127.0.0.1:8069"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# --- Function to download the database ---
|
# --- Function to download the database ---
|
||||||
def download_odoo_db():
|
def download_odoo_db():
|
||||||
logger.info(f"Attempting to download database '{DATABASE_NAME}' from URL '{ODOO_URL}'...")
|
logger.info(
|
||||||
|
f"Attempting to download database '{DATABASE_NAME}' from URL '{ODOO_URL}'..."
|
||||||
|
)
|
||||||
|
|
||||||
# URL for the backup endpoint
|
# URL for the backup endpoint
|
||||||
backup_url = f'{ODOO_URL}/web/database/backup'
|
backup_url = f"{ODOO_URL}/web/database/backup"
|
||||||
|
|
||||||
# Form data for the POST request
|
# Form data for the POST request
|
||||||
payload = {
|
payload = {
|
||||||
'master_pwd': MASTER_PASSWORD,
|
"master_pwd": MASTER_PASSWORD,
|
||||||
'name': DATABASE_NAME,
|
"name": DATABASE_NAME,
|
||||||
'backup_format': BACKUP_FORMAT,
|
"backup_format": BACKUP_FORMAT,
|
||||||
}
|
}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
@ -43,20 +51,28 @@ def download_odoo_db():
|
||||||
response.raise_for_status() # Raise an exception for bad status codes
|
response.raise_for_status() # Raise an exception for bad status codes
|
||||||
|
|
||||||
# --- VALIDATION ---
|
# --- VALIDATION ---
|
||||||
content_type = response.headers.get('Content-Type', '').split(';')[0]
|
content_type = response.headers.get("Content-Type", "").split(";")[0]
|
||||||
|
|
||||||
# Check if the content type is valid
|
# Check if the content type is valid
|
||||||
expected_types = ['application/zip', 'application/octet-stream']
|
expected_types = ["application/zip", "application/octet-stream"]
|
||||||
if content_type not in expected_types:
|
if content_type not in expected_types:
|
||||||
logger.error(f"ERROR: Expected one of {expected_types} but got {content_type}.")
|
logger.error(
|
||||||
logger.error("This usually indicates a server-side error or an incorrect master password.")
|
f"ERROR: Expected one of {expected_types} but got {content_type}."
|
||||||
|
)
|
||||||
|
logger.error(
|
||||||
|
"This usually indicates a server-side error or an incorrect master password."
|
||||||
|
)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# Check if the content is an HTML page (to handle incorrect passwords)
|
# Check if the content is an HTML page (to handle incorrect passwords)
|
||||||
first_chunk = next(response.iter_content(chunk_size=128), b'')
|
first_chunk = next(response.iter_content(chunk_size=128), b"")
|
||||||
if first_chunk.startswith(b'<'):
|
if first_chunk.startswith(b"<"):
|
||||||
logger.error("ERROR: It seems the server returned an HTML page instead of a database file.")
|
logger.error(
|
||||||
logger.error("This is often due to an incorrect master password or an invalid request.")
|
"ERROR: It seems the server returned an HTML page instead of a database file."
|
||||||
|
)
|
||||||
|
logger.error(
|
||||||
|
"This is often due to an incorrect master password or an invalid request."
|
||||||
|
)
|
||||||
logger.error("Server Response (First 200 chars):")
|
logger.error("Server Response (First 200 chars):")
|
||||||
logger.error(response.text[:200])
|
logger.error(response.text[:200])
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
@ -65,26 +81,35 @@ def download_odoo_db():
|
||||||
logger.info(f"Download started, saving to '{OUTPUT_FILE_NAME}'...")
|
logger.info(f"Download started, saving to '{OUTPUT_FILE_NAME}'...")
|
||||||
|
|
||||||
output_path = Path(OUTPUT_FILE_NAME)
|
output_path = Path(OUTPUT_FILE_NAME)
|
||||||
with open(output_path, 'wb') as f:
|
with open(output_path, "wb") as f:
|
||||||
# Write the content from the first chunk to the file
|
# Write the content from the first chunk to the file
|
||||||
f.write(first_chunk)
|
f.write(first_chunk)
|
||||||
# Continue writing the rest of the stream in chunks
|
# Continue writing the rest of the stream in chunks
|
||||||
for chunk in response.iter_content(chunk_size=8192):
|
for chunk in response.iter_content(chunk_size=8192):
|
||||||
f.write(chunk)
|
f.write(chunk)
|
||||||
|
|
||||||
logger.info(f"Download successful! File saved at: {output_path.resolve()}")
|
logger.info(
|
||||||
|
f"Download successful! File saved at: {output_path.resolve()}"
|
||||||
|
)
|
||||||
|
|
||||||
except requests.exceptions.RequestException as e:
|
except requests.exceptions.RequestException as e:
|
||||||
logger.error(f"An error occurred while connecting to the Odoo server: {e}")
|
logger.error(
|
||||||
|
f"An error occurred while connecting to the Odoo server: {e}"
|
||||||
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"An unexpected error occurred: {e}")
|
logger.error(f"An unexpected error occurred: {e}")
|
||||||
|
|
||||||
|
|
||||||
# --- Script execution ---
|
# --- Script execution ---
|
||||||
if __name__ == '__main__':
|
if __name__ == "__main__":
|
||||||
# Add a simple check to ensure the user has configured the variables
|
# Add a simple check to ensure the user has configured the variables
|
||||||
if ODOO_URL == 'http://localhost:8069' and DATABASE_NAME == 'your_database_name':
|
if (
|
||||||
logger.error("Please configure the ODOO_URL, DATABASE_NAME, and MASTER_PASSWORD variables at the start of the script.")
|
ODOO_URL == "http://localhost:8069"
|
||||||
|
and DATABASE_NAME == "your_database_name"
|
||||||
|
):
|
||||||
|
logger.error(
|
||||||
|
"Please configure the ODOO_URL, DATABASE_NAME, and MASTER_PASSWORD variables at the start of the script."
|
||||||
|
)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
download_odoo_db()
|
download_odoo_db()
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
@ -301,18 +301,13 @@ def main():
|
||||||
all_temp_bd = []
|
all_temp_bd = []
|
||||||
|
|
||||||
# Step 0, drop and restore
|
# Step 0, drop and restore
|
||||||
cmd_drop_db = (
|
cmd_drop_db = f"./odoo_bin.sh db --drop --database {bd_temp_name}"
|
||||||
f"./odoo_bin.sh db --drop --database {bd_temp_name}"
|
|
||||||
)
|
|
||||||
all_temp_bd.append(bd_temp_name)
|
all_temp_bd.append(bd_temp_name)
|
||||||
run_cmd(cmd_drop_db)
|
run_cmd(cmd_drop_db)
|
||||||
if not base_image_name or base_image_name == image_name_to_generate:
|
if not base_image_name or base_image_name == image_name_to_generate:
|
||||||
with_demo = dct_config_image.get("with_demo")
|
with_demo = dct_config_image.get("with_demo")
|
||||||
# Create a new one
|
# Create a new one
|
||||||
cmd = (
|
cmd = f"./odoo_bin.sh db --create --database" f" {bd_temp_name}"
|
||||||
f"./odoo_bin.sh db --create --database"
|
|
||||||
f" {bd_temp_name}"
|
|
||||||
)
|
|
||||||
if with_demo:
|
if with_demo:
|
||||||
cmd += " --demo"
|
cmd += " --demo"
|
||||||
else:
|
else:
|
||||||
|
|
@ -352,9 +347,7 @@ def main():
|
||||||
# Step 6, clean if ask
|
# Step 6, clean if ask
|
||||||
if not config.keep_database:
|
if not config.keep_database:
|
||||||
for db_name in all_temp_bd:
|
for db_name in all_temp_bd:
|
||||||
cmd_drop_db = (
|
cmd_drop_db = f"./odoo_bin.sh db --drop --database {db_name}"
|
||||||
f"./odoo_bin.sh db --drop --database {db_name}"
|
|
||||||
)
|
|
||||||
run_cmd(cmd_drop_db)
|
run_cmd(cmd_drop_db)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
@ -7,7 +7,6 @@ import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
new_path = os.path.normpath(
|
new_path = os.path.normpath(
|
||||||
os.path.join(os.path.dirname(__file__), "..", "..")
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
@ -24,7 +24,9 @@ DEFAULT_PATH_MANIFEST_ODOO_CONF = os.path.join("conf", "git_manifest_odoo.csv")
|
||||||
DEFAULT_PATH_MANIFEST_PRIVATE_CONF = os.path.join(
|
DEFAULT_PATH_MANIFEST_PRIVATE_CONF = os.path.join(
|
||||||
"private", "default_git_manifest.csv"
|
"private", "default_git_manifest.csv"
|
||||||
)
|
)
|
||||||
DEFAULT_PATH_INSTALLED_ODOO_VERSION = os.path.join(".repo", "installed_odoo_version.txt")
|
DEFAULT_PATH_INSTALLED_ODOO_VERSION = os.path.join(
|
||||||
|
".repo", "installed_odoo_version.txt"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_config():
|
def get_config():
|
||||||
|
|
@ -44,7 +46,11 @@ def get_config():
|
||||||
"--input",
|
"--input",
|
||||||
help="First manifest to merge into input2. Second manifest, overwrite by input1.",
|
help="First manifest to merge into input2. Second manifest, overwrite by input1.",
|
||||||
)
|
)
|
||||||
parser.add_argument("--output", default=".repo/local_manifests/erplibre_manifest.xml", help="Output of new manifest")
|
parser.add_argument(
|
||||||
|
"--output",
|
||||||
|
default=".repo/local_manifests/erplibre_manifest.xml",
|
||||||
|
help="Output of new manifest",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--att_revision_only",
|
"--att_revision_only",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
|
|
@ -89,11 +95,14 @@ def main():
|
||||||
|
|
||||||
if os.path.exists(DEFAULT_PATH_INSTALLED_ODOO_VERSION):
|
if os.path.exists(DEFAULT_PATH_INSTALLED_ODOO_VERSION):
|
||||||
with open(DEFAULT_PATH_INSTALLED_ODOO_VERSION, "r") as f:
|
with open(DEFAULT_PATH_INSTALLED_ODOO_VERSION, "r") as f:
|
||||||
lst_installed_odoo_version = [a.strip() for a in f.readlines()]
|
lst_installed_odoo_version = [
|
||||||
|
a.strip() for a in f.readlines()
|
||||||
|
]
|
||||||
if lst_installed_odoo_version:
|
if lst_installed_odoo_version:
|
||||||
for installed_odoo_version in lst_installed_odoo_version:
|
for installed_odoo_version in lst_installed_odoo_version:
|
||||||
path_manifest_odoo_version = os.path.join(
|
path_manifest_odoo_version = os.path.join(
|
||||||
"manifest", f"git_manifest_{installed_odoo_version}.xml"
|
"manifest",
|
||||||
|
f"git_manifest_{installed_odoo_version}.xml",
|
||||||
)
|
)
|
||||||
if os.path.exists(path_manifest_odoo_version):
|
if os.path.exists(path_manifest_odoo_version):
|
||||||
lst_input.append(path_manifest_odoo_version)
|
lst_input.append(path_manifest_odoo_version)
|
||||||
|
|
@ -102,7 +111,8 @@ def main():
|
||||||
f"ERROR: {path_manifest_odoo_version} does not exist"
|
f"ERROR: {path_manifest_odoo_version} does not exist"
|
||||||
)
|
)
|
||||||
path_manifest_odoo_version = os.path.join(
|
path_manifest_odoo_version = os.path.join(
|
||||||
"manifest", f"git_manifest_{installed_odoo_version}_dev.xml"
|
"manifest",
|
||||||
|
f"git_manifest_{installed_odoo_version}_dev.xml",
|
||||||
)
|
)
|
||||||
if os.path.exists(path_manifest_odoo_version):
|
if os.path.exists(path_manifest_odoo_version):
|
||||||
lst_input.append(path_manifest_odoo_version)
|
lst_input.append(path_manifest_odoo_version)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
@ -97,7 +97,10 @@ def main():
|
||||||
# Default paths and fallback values (same logic as in the bash script)
|
# Default paths and fallback values (same logic as in the bash script)
|
||||||
el_user = args.user
|
el_user = args.user
|
||||||
el_home_erplibre = args.home_erplibre or os.getcwd()
|
el_home_erplibre = args.home_erplibre or os.getcwd()
|
||||||
el_config_name = args.config_name or f"erplibre_{el_user}_{os.path.basename(os.getcwd())}"
|
el_config_name = (
|
||||||
|
args.config_name
|
||||||
|
or f"erplibre_{el_user}_{os.path.basename(os.getcwd())}"
|
||||||
|
)
|
||||||
exec_param = (
|
exec_param = (
|
||||||
" "
|
" "
|
||||||
+ f" {w_cmd("-d", args.database or "")} {w_cmd("-p", args.port or "")}".strip()
|
+ f" {w_cmd("-d", args.database or "")} {w_cmd("-p", args.port or "")}".strip()
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# © 2021-2024 TechnoLibre (http://www.technolibre.ca)
|
# © 2021-2025 TechnoLibre (http://www.technolibre.ca)
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
||||||
|
|
||||||
# This script need only basic importation, it needs to be supported by python of your system
|
# This script need only basic importation, it needs to be supported by python of your system
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue