Compare commits

...

3 Commits

3 changed files with 9 additions and 13 deletions

View File

@ -22,5 +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() {
@ -83,7 +80,7 @@ tls_cert() {
set_apache() {
echo "Setting up Apache HTTP Server"
cp $run_directory_path/scanservjs.conf $apache_sites_directory_path/
cp $run_directory_path/apache-sites/scanservjs.conf $apache_sites_directory_path/
a2dissite *
a2ensite scanservjs
a2enmod ssl proxy proxy_http proxy_http2
@ -125,7 +122,6 @@ init
install_packages
add_users
get_conf
set_conf
set_cups_conf
set_sane_conf
ssh_pubkey