Adapt get_conf() with new conf-sync
This commit is contained in:
parent
5bcd9619f1
commit
7c95eb2920
@ -22,6 +22,5 @@ Files in this repository cover all the SBC setup.
|
|||||||
* `scanservjs.conf` is an Apache HTTP vhost file for scanservjs.
|
* `scanservjs.conf` is an Apache HTTP vhost file for scanservjs.
|
||||||
|
|
||||||
### TODO
|
### TODO
|
||||||
* When new conf-sync will be available, adapt functions `get_conf()` and `set_conf()`.
|
|
||||||
* Add an update script for scanservjs.
|
* Add an update script for scanservjs.
|
||||||
* Add a firewall rule to block access to port 8080.
|
* Add a firewall rule to block access to port 8080.
|
||||||
|
18
setup.sh
18
setup.sh
@ -33,18 +33,15 @@ add_users() {
|
|||||||
usermod -a -G lp saned
|
usermod -a -G lp saned
|
||||||
}
|
}
|
||||||
|
|
||||||
get_conf() { # TODO when new conf-sync will be available
|
get_sync() { # TODO when new conf-sync will be available
|
||||||
echo "Getting configuration"
|
echo "Getting and deploying sync configuration"
|
||||||
sudo -H -u $user mkdir $sync_directory_path
|
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
|
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
|
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() {
|
set_cups_conf() {
|
||||||
@ -54,7 +51,7 @@ set_cups_conf() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set_sane_conf() {
|
set_sane_conf() {
|
||||||
systemctl enable saned.socket
|
systemctl enable saned.socket # FIXME that really needed?
|
||||||
}
|
}
|
||||||
|
|
||||||
ssh_pubkey() {
|
ssh_pubkey() {
|
||||||
@ -125,7 +122,6 @@ init
|
|||||||
install_packages
|
install_packages
|
||||||
add_users
|
add_users
|
||||||
get_conf
|
get_conf
|
||||||
set_conf
|
|
||||||
set_cups_conf
|
set_cups_conf
|
||||||
set_sane_conf
|
set_sane_conf
|
||||||
ssh_pubkey
|
ssh_pubkey
|
||||||
|
Loading…
Reference in New Issue
Block a user