Adapt get_conf() with new conf-sync

This commit is contained in:
Alexandre CATTEAU 2022-03-21 12:13:39 +01:00
parent 5bcd9619f1
commit 7c95eb2920
2 changed files with 7 additions and 12 deletions

View File

@ -22,6 +22,5 @@ Files in this repository cover all the SBC setup.
* `scanservjs.conf` is an Apache HTTP vhost file for scanservjs.
### TODO
* When new conf-sync will be available, adapt functions `get_conf()` and `set_conf()`.
* Add an update script for scanservjs.
* Add a firewall rule to block access to port 8080.

View File

@ -33,18 +33,15 @@ add_users() {
usermod -a -G lp saned
}
get_conf() { # TODO when new conf-sync will be available
echo "Getting configuration"
get_sync() { # TODO when new conf-sync will be available
echo "Getting and deploying sync configuration"
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
# 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
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 \
$sync_directory_path/conf-sync/variables.conf
sudo -H -u $user $sync_directoyy_path/conf-sync/install.sh
}
set_cups_conf() {
@ -54,7 +51,7 @@ set_cups_conf() {
}
set_sane_conf() {
systemctl enable saned.socket
systemctl enable saned.socket # FIXME that really needed?
}
ssh_pubkey() {
@ -125,7 +122,6 @@ init
install_packages
add_users
get_conf
set_conf
set_cups_conf
set_sane_conf
ssh_pubkey