40 lines
1.0 KiB
Bash
40 lines
1.0 KiB
Bash
#!/bin/bash
|
|
|
|
# The purpose of this script is to setup our ISO server on a blank Armbian.
|
|
# This script is to be run as root.
|
|
# This script runs AFTER setup1.sh, which installs OMV and reboots the system
|
|
|
|
# YOU SHOULD REMOVE THIS SCRIPT AFTER SETUP
|
|
|
|
# Functions
|
|
|
|
|
|
# Only run if the user is root
|
|
if [[ $USER != 'root' ]] ; then
|
|
echo "You must run this script as root!"
|
|
exit 1
|
|
fi
|
|
|
|
run_directory_path=$(pwd)
|
|
|
|
# Set parameters
|
|
|
|
|
|
# Main process
|
|
# You should comment below what you do not want to happen
|
|
|
|
|
|
echo ""
|
|
echo "We're all good here!"
|
|
echo "You should now:"
|
|
echo "* set $user's password"
|
|
echo "* lock root and admin accounts"
|
|
echo "* remove $run_directory_path content"
|
|
echo "* reboot the SBC"
|
|
echo "And perhaps:"
|
|
echo "* set htop at your convenience"
|
|
echo "* use below commands to edit SSH config:"
|
|
echo " sed -i 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config"
|
|
echo " sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config" # NOTE This one is different from the others, because of OMV setup
|
|
exit 0
|