Compare commits
3 Commits
743b11b991
...
7c95eb2920
Author | SHA1 | Date | |
---|---|---|---|
7c95eb2920 | |||
5bcd9619f1 | |||
b266e8b498 |
@ -22,5 +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.
|
||||||
|
20
setup.sh
20
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() {
|
||||||
@ -83,7 +80,7 @@ tls_cert() {
|
|||||||
|
|
||||||
set_apache() {
|
set_apache() {
|
||||||
echo "Setting up Apache HTTP Server"
|
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 *
|
a2dissite *
|
||||||
a2ensite scanservjs
|
a2ensite scanservjs
|
||||||
a2enmod ssl proxy proxy_http proxy_http2
|
a2enmod ssl proxy proxy_http proxy_http2
|
||||||
@ -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