working traefik
This commit is contained in:
@@ -3,16 +3,24 @@ template templates/hostname /etc/hostname
|
||||
|
||||
|
||||
rex doas apk update
|
||||
rex doas apk add bash doas openssh
|
||||
rex doas apk add bash doas openssh linux-lts
|
||||
|
||||
### activate lts kerner
|
||||
template templates/extlinux.conf /boot/extlinux.conf
|
||||
rex doas chown root:root /boot/extlinux.conf
|
||||
rex doas chmod 644 /boot/extlinux.conf
|
||||
|
||||
|
||||
# ass swap file ????
|
||||
# ------ disable root user and login
|
||||
|
||||
rex doas mkdir -p /4server
|
||||
rex doas chmod 777 /4server
|
||||
|
||||
|
||||
# ----- install nabula
|
||||
echo "prsync nebula bin"
|
||||
prsync -h "$hosts_file" -avz ./sbin/nebula /4server/nebula
|
||||
prsync -h "/app/host_vars/hosts" -avz ./sbin/nebula /4server/nebula
|
||||
rex doas mv /4server/nebula /usr/bin/
|
||||
|
||||
rex doas mkdir -p /etc/nebula
|
||||
@@ -29,7 +37,7 @@ template templates/init.d/nebula /etc/init.d/nebula
|
||||
rex doas chmod 0755 /etc/init.d/nebula
|
||||
rex doas chown root:root /etc/init.d/nebula
|
||||
rex doas rc-update add nebula default
|
||||
rex doas rc-service nebula restart
|
||||
### nebula restart must be last command
|
||||
|
||||
template templates/init.d/ping_service /etc/init.d/ping_service
|
||||
rex doas chmod 0755 /etc/init.d/ping_service
|
||||
@@ -53,6 +61,7 @@ rex doas chmod 700 /home/4server/.ssh
|
||||
rex doas chmod 600 /home/4server/.ssh/authorized_keys
|
||||
rex doas chown 4server:4server /home/4server/.ssh/authorized_keys
|
||||
|
||||
rex doas usermod -p Ne82Vrx8QfUdNHvLgct 4server
|
||||
rex doas passwd -u 4server
|
||||
|
||||
|
||||
@@ -61,8 +70,9 @@ rex doas passwd -u 4server
|
||||
rex doas mkdir -p /etc/doas.d
|
||||
|
||||
rex "doas sh -c 'grep -q \"permit nopass 4server as root\" /etc/doas.d/4server.conf 2>/dev/null || echo \"permit nopass 4server as root\" | tee -a /etc/doas.d/4server.conf > /dev/null'"
|
||||
|
||||
rex "doas sh -c 'sed -i \"s/^#\?PasswordAuthentication.*/PasswordAuthentication no/\" /etc/ssh/sshd_config'"
|
||||
|
||||
rex "doas sh -c 'sed -i \"s/^#\?PasswordAuthentication.*/PasswordAuthentication no/\" /etc/ssh/sshd_config.d/50-cloud-init.conf'"
|
||||
rex doas rc-service sshd restart
|
||||
|
||||
rex doas rc-service nebula restart
|
||||
rex doas reboot
|
||||
|
||||
Reference in New Issue
Block a user