mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-28 10:40:07 +00:00
tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
8dc4d4a32d
commit
0c67c3c36d
@ -90,7 +90,7 @@ echo "# Setup: iptables..."
|
||||
|
||||
echo "# Setup: iptables update script..."
|
||||
@ lxc-attach $ID rc-update add local
|
||||
@ lxc-attach $ID ln -s /root/routing.sh /etc/local.d/iptables-update.start
|
||||
@ lxc-attach $ID -- ln -s /root/routing.sh /etc/local.d/iptables-update.start
|
||||
|
||||
echo "# Post config..."
|
||||
pctSet $ID "${OPTS_STAGE_2}" $REBOOT
|
||||
|
||||
17
ssh/make.sh
17
ssh/make.sh
@ -65,12 +65,19 @@ echo "# Creating CT..."
|
||||
pctCreateDebian $ID "${OPTS_STAGE_1}" "$PASS"
|
||||
|
||||
echo "# Installing dependencies..."
|
||||
@ lxc-attach $ID apt install vim htop iftop iotop tmux mc
|
||||
@ lxc-attach $ID apt install vim htop iftop iotop tmux mc sudo
|
||||
|
||||
echo "# Setup: user..."
|
||||
xread "user name for ssh: " SSH_USER
|
||||
[ -z $SSH_USER ] \
|
||||
|| @ lxc-attach $ID -- adduser $SSH_USER
|
||||
echo "# Setup: users..."
|
||||
while true ; do
|
||||
xread "user name for ssh: " SSH_USER
|
||||
[ -z $SSH_USER ] \
|
||||
|| @ lxc-attach $ID -- adduser $SSH_USER
|
||||
read -ep "Add another user? [y/N]: " MORE
|
||||
if [[ $MORE == 'y' ]] ; then
|
||||
continue
|
||||
fi
|
||||
break
|
||||
done
|
||||
|
||||
echo "# Post config..."
|
||||
pctSet $ID "${OPTS_STAGE_2}" $REBOOT
|
||||
|
||||
@ -83,9 +83,7 @@ echo "# Copying assets..."
|
||||
echo "# Setup: wireguard default profile..."
|
||||
@ lxc-attach $ID -- bash -c "cd /root && \
|
||||
ENDPOINT_PORT=51820 \
|
||||
ENDPOINT=${ENDPOINT} \
|
||||
CLIENT_IP=10.42.0.1/32 \
|
||||
DNS=${NS_LAN_IP/\/*} \
|
||||
ALLOWED_IPS=0.0.0.0/0 \
|
||||
make default.client"
|
||||
@ lxc-attach $ID -- chmod 600 /etc/wireguard/wg0.conf
|
||||
|
||||
@ -30,6 +30,8 @@ CLIENT_IP ?= 10.42.0.1/32
|
||||
cat $< | wg pubkey > $@
|
||||
|
||||
|
||||
# NOTE: the first letter of each pattern is quoted to prevent it from
|
||||
# being substituted when generating this Makefile from template.
|
||||
$(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY)
|
||||
cat $< \
|
||||
| sed \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user