Few fixes
This commit is contained in:
parent
33a17e072d
commit
aed5b8da81
15
setup.sh
15
setup.sh
@ -36,12 +36,12 @@ get_sync() {
|
|||||||
echo "Getting and deploying sync configuration"
|
echo "Getting and deploying sync configuration"
|
||||||
sudo -H -u $user mkdir $sync_directory_path
|
sudo -H -u $user mkdir $sync_directory_path
|
||||||
sudo -H -u $user git clone https://gitea.kto.black/adminconf/rcs-general.git $sync_directory_path/rcs-general
|
sudo -H -u $user git clone https://gitea.kto.black/adminconf/rcs-general.git $sync_directory_path/rcs-general
|
||||||
sudo -H -u $user $sync_directoyy_path/rcs-general/install.sh
|
sudo -H -u $user $sync_directory_path/rcs-general/install.sh
|
||||||
sudo -H -u $user git clone https://gitea.kto.black/adminconf/conf-sync.git $sync_directory_path/conf-sync
|
sudo -H -u $user git clone https://gitea.kto.black/adminconf/conf-sync.git $sync_directory_path/conf-sync
|
||||||
sudo -H -u $user cp $sync_directory_path/conf-sync/variables.conf.template \
|
sudo -H -u $user cp $sync_directory_path/conf-sync/variables.conf.template \
|
||||||
$sync_directory_path/conf-sync/variables.conf
|
$sync_directory_path/conf-sync/variables.conf
|
||||||
sudo -H -u $user sed -i -e "s/\"desktop\"/\"server\"/g" $sync_directory_path/conf-sync/variables.conf
|
sudo -H -u $user sed -i -e "s/\"desktop\"/\"server\"/g" $sync_directory_path/conf-sync/variables.conf
|
||||||
sudo -H -u $user $sync_directoyy_path/conf-sync/install.sh
|
sudo -H -u $user $sync_directory_path/conf-sync/install.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
ssh_pubkey() {
|
ssh_pubkey() {
|
||||||
@ -51,6 +51,12 @@ ssh_pubkey() {
|
|||||||
sudo -H -u $user mv /home/$user/.ssh/$remote_pubkey /home/$user/.ssh/authorized_keys
|
sudo -H -u $user mv /home/$user/.ssh/$remote_pubkey /home/$user/.ssh/authorized_keys
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_sshd_conf() {
|
||||||
|
echo "Editing OpenSSH daemon config..."
|
||||||
|
sed -i -e "s/#PasswordAuthentication yes/PasswordAuthentication no/g" /etc/ssh/sshd_config
|
||||||
|
sed -i -e "s/PermitRootLogin yes/PermitRootLogin no/g" /etc/ssh/sshd_config
|
||||||
|
}
|
||||||
|
|
||||||
set_cpufreq() {
|
set_cpufreq() {
|
||||||
if [ $default_hostname = 'orangepizero' ]; then
|
if [ $default_hostname = 'orangepizero' ]; then
|
||||||
echo "Setting CPU frequency to performance"
|
echo "Setting CPU frequency to performance"
|
||||||
@ -85,14 +91,17 @@ remote_pubkey='home.pub'
|
|||||||
init
|
init
|
||||||
install_packages
|
install_packages
|
||||||
add_users
|
add_users
|
||||||
get_conf
|
get_sync
|
||||||
ssh_pubkey
|
ssh_pubkey
|
||||||
|
set_sshd_conf
|
||||||
|
set_cpufreq
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "We're all good here!"
|
echo "We're all good here!"
|
||||||
echo "You should now:"
|
echo "You should now:"
|
||||||
echo "* set $user's password"
|
echo "* set $user's password"
|
||||||
echo "* lock root account"
|
echo "* lock root account"
|
||||||
|
echo "* copy your SSH config file"
|
||||||
echo "* reboot the SBC"
|
echo "* reboot the SBC"
|
||||||
echo "And perhaps:"
|
echo "And perhaps:"
|
||||||
echo "* set htop at your convenience"
|
echo "* set htop at your convenience"
|
||||||
|
Reference in New Issue
Block a user