Add use case printscan and sbc odroidhc2
This commit is contained in:
parent
7d517c52f4
commit
3d56255cd7
14
setup.sh
14
setup.sh
@ -41,6 +41,10 @@ useradd -U -G sudo -m -s /bin/bash $user
|
||||
chmod 700 /home/$user
|
||||
echo "Let's define a password for $user as we are about to run sudo with it. It can of course be changed after setup."
|
||||
passwd $user
|
||||
if [[ $use_case = 'printscan-server' ]]; then
|
||||
usermod -a -G lpadmin $user
|
||||
usermod -a -G lp saned
|
||||
fi
|
||||
|
||||
# get .sync scripts
|
||||
echo "Getting and deploying sync configuration"
|
||||
@ -57,7 +61,7 @@ sudo -H -u $user $sync_directory_path/conf-sync/install.sh
|
||||
echo "Getting and deploying use-case $use_case configuration"
|
||||
if [[ $use_case != 'ssh-bounce-server' ]]; then
|
||||
sudo -H -u $user git clone https://gitea.kto.black/adminconf/$use_case.git $sync_directory_path/$use_case
|
||||
# TODO how to start install? We need to define variables
|
||||
sudo -H -u $user $sync_directory_path/$use_case/setup.sh
|
||||
fi
|
||||
|
||||
# SSH config
|
||||
@ -69,7 +73,7 @@ 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
|
||||
|
||||
# specific function for orangepizero
|
||||
# specific setting for orangepizero
|
||||
if [[ $sbc = 'orangepizero' ]]; then
|
||||
echo "Setting CPU frequency to performance"
|
||||
sed -i -e "s/GOVERNOR=ondemand/GOVERNOR=performance/g" /etc/default/cpufrequtils
|
||||
@ -81,6 +85,12 @@ echo "You should now:"
|
||||
echo "* lock root account"
|
||||
if [[ $use_case = 'ssh-bounce-server' ]]; then
|
||||
echo "* clone remote-stuff"
|
||||
elif [[ $use_case = 'printscan-server' ]]; then
|
||||
echo "* connect to http://$hostname:631/ and add a printer"
|
||||
fi
|
||||
if [[ $sbc = 'odroidhc2' ]]; then
|
||||
echo "* Run armbian-config utility and go to section system"
|
||||
echo " -> DTB and select optimized board configuration for Odroid HC1/2"
|
||||
fi
|
||||
echo "* reboot the SBC"
|
||||
echo "And perhaps:"
|
||||
|
Loading…
Reference in New Issue
Block a user