Python Notes
Virtual Environments
Create a Python virtual environment in the current directory on a Linux system
python3 -m venv env
To enter the environment from the directory
source env/bin/activate
To exit the environment
deactivate
Create a Python virtual environment in the current directory on a Linux system
python3 -m venv env
To enter the environment from the directory
source env/bin/activate
To exit the environment
deactivate
This guide provides clear steps on how to mount a CIFS (Common Internet File System) share directly to a Proxmox host and then make that share accessible within an LXC (Linux Container) on the same host. 1. Mount the CIFS Share to the Proxmox Host Mount the network share to
The following steps will create a script that will run anytime a user profile is loaded/logged in. The script will send a notification to a webhook. Create the script file sudo nano /usr/local/bin/login_webhook.sh Save the following script #!/bin/bash # URL of the webhook WEBHOOK_
If running Postfix in a container the commands below can be used to configure a custom mail route for a domain. This will allow the Postfix server to delivery emails for the configured domain to a specific MTA/mail server instead of using the domains MX record. 1. Access the
View container logs docker logs -f container_id_or_name Delete container logs sudo truncate -s 0 /var/lib/docker/containers/container_id/container_id-json.log docker restart container_id_or_name Connect to container cmdline docker exec -it CONTAINERNAME bash