mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-12-25 12:52:04 +00:00
Compare commits
5 Commits
16205e66ec
...
229923e419
| Author | SHA1 | Date | |
|---|---|---|---|
| 229923e419 | |||
| 2c3f832854 | |||
| eb24b3e8b5 | |||
| a3fff0cf44 | |||
| 18f0de3ae2 |
29
README.md
29
README.md
@ -4,22 +4,23 @@ A set of scripts for automating setup and tasks in proxmox.
|
|||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
- revise defaults
|
- revise defaults
|
||||||
|
- separate templates/assets into distribution and user directories
|
||||||
## Goals
|
...this is needed to allow the user to change the configs without the
|
||||||
- support the basic CT lifecicle:
|
fear of them being overwritten by git (similar to how config is handlerd)
|
||||||
- setup/build/update
|
- automate:
|
||||||
- run
|
- create/destory -- DONE
|
||||||
- destroy
|
- updates
|
||||||
|
- backup/restore
|
||||||
- basic infrastructure CT's
|
- basic infrastructure CT's
|
||||||
- ns
|
- ns -- DONE
|
||||||
- gate / reverse proxy
|
- gate / reverse proxy -- DONE
|
||||||
- basic service CT's
|
- basic service CT's
|
||||||
- syncthing
|
- syncthing -- DONE
|
||||||
- git
|
- git -- DONE
|
||||||
- nextcloud
|
- nextcloud -- DONE
|
||||||
- vpn
|
- vpn -- DONE
|
||||||
- ssh
|
- ssh -- DONE
|
||||||
- mail (???)
|
- mail
|
||||||
- basic recurent tasks
|
- basic recurent tasks
|
||||||
- backups
|
- backups
|
||||||
- archiving
|
- archiving
|
||||||
|
|||||||
@ -98,20 +98,21 @@ echo "# Copying assets..."
|
|||||||
@ lxc-attach $ID -- chmod +x /root/getFreeClientIP
|
@ lxc-attach $ID -- chmod +x /root/getFreeClientIP
|
||||||
|
|
||||||
#echo "# Setup: wireguard server..."
|
#echo "# Setup: wireguard server..."
|
||||||
@ lxc-attach $ID -- bash -c 'cd /root && make server'
|
@ lxc-attach $ID -- bash -c "cd /root && make server"
|
||||||
|
|
||||||
echo "# Setup: wireguard default profile..."
|
echo "# Setup: wireguard default profile..."
|
||||||
@ lxc-attach $ID -- bash -c "cd /root && make default.client"
|
@ lxc-attach $ID -- bash -c "cd /root \
|
||||||
|
&& QRCODE=${QRCODE} make default.client"
|
||||||
@ lxc-attach $ID -- chmod 600 /etc/wireguard/wg0.conf
|
@ lxc-attach $ID -- chmod 600 /etc/wireguard/wg0.conf
|
||||||
|
|
||||||
echo "# client config:"
|
echo "# client config:"
|
||||||
@ mkdir -p clients
|
@ mkdir -p clients
|
||||||
@ pct pull $ID /etc/wireguard/clients/default.conf clients/default.conf
|
@ pct pull $ID /etc/wireguard/clients/default.conf clients/default.conf
|
||||||
# show the profile as a qrcode...
|
# show the profile as a qrcode...
|
||||||
if [ "$QRCODE" ] ; then
|
#if [ "$QRCODE" ] ; then
|
||||||
echo "# default profile:"
|
# echo "# default profile:"
|
||||||
@ lxc-attach $ID -- qrencode -t UTF8 -r /etc/wireguard/clients/default.conf
|
# @ lxc-attach $ID -- qrencode -t UTF8 -r /etc/wireguard/clients/default.conf
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
#echo "# Setup: bridge device..."
|
#echo "# Setup: bridge device..."
|
||||||
@ lxc-attach $ID wg-quick up wg0
|
@ lxc-attach $ID wg-quick up wg0
|
||||||
|
|||||||
@ -11,6 +11,7 @@ SERVER_PUBLIC_KEY := $(SERVER_DIR)/server_id.pub
|
|||||||
CLIENT_TPL := templates/client.conf
|
CLIENT_TPL := templates/client.conf
|
||||||
CLIENT_DIR := $(SERVER_DIR)/clients/
|
CLIENT_DIR := $(SERVER_DIR)/clients/
|
||||||
|
|
||||||
|
QRCODE ?= 1
|
||||||
|
|
||||||
ENDPOINT ?= ${ENDPOINT}
|
ENDPOINT ?= ${ENDPOINT}
|
||||||
ENDPOINT_PORT ?= ${ENDPOINT_PORT}
|
ENDPOINT_PORT ?= ${ENDPOINT_PORT}
|
||||||
@ -61,7 +62,9 @@ $(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY)
|
|||||||
-e 's/\$${\CLIENT_PUBLIC_KEY}/'$$(sed -e 's/\//\\\//g' "$(CLIENT_DIR)/$*_id.pub")'/g' \
|
-e 's/\$${\CLIENT_PUBLIC_KEY}/'$$(sed -e 's/\//\\\//g' "$(CLIENT_DIR)/$*_id.pub")'/g' \
|
||||||
-e 's/\$${\SERVER_PUBLIC_KEY}/'$$(sed -e 's/\//\\\//g' "$(SERVER_PUBLIC_KEY)")'/g' \
|
-e 's/\$${\SERVER_PUBLIC_KEY}/'$$(sed -e 's/\//\\\//g' "$(SERVER_PUBLIC_KEY)")'/g' \
|
||||||
>> "$(SERVER_CONF)"
|
>> "$(SERVER_CONF)"
|
||||||
|
@ [ -z "$$QRCODE" ] \
|
||||||
|
|| ( echo "# Profile: $*" \
|
||||||
|
&& qrencode -t UTF8 -r "$(CLIENT_DIR)/$*.conf" )
|
||||||
|
|
||||||
|
|
||||||
server: $(SERVER_CONF)
|
server: $(SERVER_CONF)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user