Remove rcs_links(), replaced by an install script in rcs-general

This commit is contained in:
Alexandre CATTEAU 2022-03-12 12:41:10 +01:00
parent 3bb3d2c5fa
commit 541d2e3213
2 changed files with 3 additions and 16 deletions

View File

@ -21,5 +21,4 @@ Files in this repository cover all the SBC setup.
* `cupsd.conf` is the config file for CUPS, set by setup script
### TODO
* When rcs-general's install script will be available, remove function `rcs_links()`.
* When new conf-sync will be available, adapt functions `get_conf()` and `set_conf()`.

View File

@ -36,13 +36,14 @@ add_users() {
get_conf() { # TODO when new conf-sync will be available
echo "Getting configuration"
sudo -H -u $user mkdir $sync_directory_path
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
# git clone confsync-du-futur
}
set_conf() { # TODO when new conf-sync will be available
echo "Setting configuration"
sudo -H -u $user chmod u+x $sync_directoyy_path/rcs-general/install.sh
sudo -H -u $user $sync_directoyy_path/rcs-general/install.sh
# deploy confsync-du-futur
}
@ -56,18 +57,6 @@ set_sane_conf() {
systemctl enable saned.socket
}
rcs_links() { # NOTE this should be handled by an install script in rcs-general
echo "Linking rcs"
rm /home/$user/.bashrc
rm /root/.bashrc
sudo -H -u $user ln -s $sync_directory_path/rcs-general/bashrc /home/$user/.bashrc
ln -s /home/$user/.bashrc /root/.bashrc
sudo -H -u $user ln -s $sync_directory_path/rcs-general/vimrc /home/$user/.vimrc
ln -s /home/$user/.vimrc /root/.vimrc
sudo -H -u $user ln -s $sync_directory_path/rcs-general/tmux.conf /home/$user/.tmux.conf
ln -s /home/$user/.tmux.conf /root/.tmux.conf
}
ssh_pubkey() {
echo "Getting SSH public key"
sudo -H -u $user mkdir /home/$user/.ssh
@ -139,7 +128,6 @@ get_conf
set_conf
set_cups_conf
set_sane_conf
rcs_links
ssh_pubkey
install_scanservjs
tls_cert