diff --git a/README.md b/README.md index 9c5f227..45454ac 100644 --- a/README.md +++ b/README.md @@ -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()`. diff --git a/setup.sh b/setup.sh index f5b2c82..36028c8 100644 --- a/setup.sh +++ b/setup.sh @@ -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