Compare commits
No commits in common. "7c95eb292008dcc39d704f30a1ea6ae37d99582f" and "743b11b99165db25ee2f329772bd3f2f2acd3d52" have entirely different histories.
7c95eb2920
...
743b11b991
@ -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,15 +33,18 @@ add_users() {
|
|||||||
usermod -a -G lp saned
|
usermod -a -G lp saned
|
||||||
}
|
}
|
||||||
|
|
||||||
get_sync() { # TODO when new conf-sync will be available
|
get_conf() { # TODO when new conf-sync will be available
|
||||||
echo "Getting and deploying sync configuration"
|
echo "Getting 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
|
||||||
sudo -H -u $user git clone https://gitea.kto.black/adminconf/conf-sync.git $sync_directory_path/conf-sync
|
# deploy confsync-du-futur
|
||||||
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() {
|
||||||
@ -51,7 +54,7 @@ set_cups_conf() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set_sane_conf() {
|
set_sane_conf() {
|
||||||
systemctl enable saned.socket # FIXME that really needed?
|
systemctl enable saned.socket
|
||||||
}
|
}
|
||||||
|
|
||||||
ssh_pubkey() {
|
ssh_pubkey() {
|
||||||
@ -80,7 +83,7 @@ tls_cert() {
|
|||||||
|
|
||||||
set_apache() {
|
set_apache() {
|
||||||
echo "Setting up Apache HTTP Server"
|
echo "Setting up Apache HTTP Server"
|
||||||
cp $run_directory_path/apache-sites/scanservjs.conf $apache_sites_directory_path/
|
cp $run_directory_path/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
|
||||||
@ -122,6 +125,7 @@ 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