parent
c278105f55
commit
33ff1c2b7f
|
@ -0,0 +1,8 @@
|
||||||
|
[ogimages]
|
||||||
|
comment = OpenGnsys Repository
|
||||||
|
browseable = no
|
||||||
|
writeable = yes
|
||||||
|
locking = no
|
||||||
|
path = /opt/opengnsys/ogrepository/images
|
||||||
|
guest ok = no
|
||||||
|
valid users = %%OGREPOSITORY_USER%%
|
|
@ -5,6 +5,9 @@ set -e
|
||||||
GIT_BRANCH=$1
|
GIT_BRANCH=$1
|
||||||
GIT_REPO=https://ognproject.evlt.uma.es/gitea/opengnsys/ogrepository.git
|
GIT_REPO=https://ognproject.evlt.uma.es/gitea/opengnsys/ogrepository.git
|
||||||
GIT_SSL_NO_VERIFY=true
|
GIT_SSL_NO_VERIFY=true
|
||||||
|
REPO_IP=${REPO_IP:-"127.0.0.1"}
|
||||||
|
SMBUSER=${SMBUSER:-"ogrepository"}
|
||||||
|
SMBPASS=${SMBPASS:-"ogrepository"}
|
||||||
INSTALL_DIR=/opt/opengnsys/ogrepository
|
INSTALL_DIR=/opt/opengnsys/ogrepository
|
||||||
DOWNLOAD_DIR=/tmp/ogrepository
|
DOWNLOAD_DIR=/tmp/ogrepository
|
||||||
DEBIAN_FRONTEND=noninteractive
|
DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -75,6 +78,17 @@ install_files() {
|
||||||
cp -pr $DOWNLOAD_DIR/etc/* $INSTALL_DIR/etc/
|
cp -pr $DOWNLOAD_DIR/etc/* $INSTALL_DIR/etc/
|
||||||
cp -pr $DOWNLOAD_DIR/api/* $INSTALL_DIR/api/
|
cp -pr $DOWNLOAD_DIR/api/* $INSTALL_DIR/api/
|
||||||
chown -R ogrepository:ogrepository $INSTALL_DIR
|
chown -R ogrepository:ogrepository $INSTALL_DIR
|
||||||
|
echo IPlocal="$REPO_IP" > $INSTALL_DIR/etc/ogAdmRepo.cfg
|
||||||
|
}
|
||||||
|
|
||||||
|
configure_samba() {
|
||||||
|
echo "include = /etc/samba/smb.conf.ogrepository" >> /etc/samba/smb.conf
|
||||||
|
cp $DOWNLOAD_DIR/installer/files/ogrepo-smb.conf /etc/samba/smb.conf.ogrepository
|
||||||
|
sed -i "s/%%OGREPOSITORY_USER%%/$SMBUSER/g" /etc/samba/smb.conf.ogrepository
|
||||||
|
systemctl restart smbd
|
||||||
|
# Create default user ogrepository
|
||||||
|
(echo $SMBPASS; echo $SMBPASS) | smbpasswd -s -a $SMBUSER
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
## Main program
|
## Main program
|
||||||
|
@ -89,6 +103,6 @@ install_updcast
|
||||||
create_directories
|
create_directories
|
||||||
install_files
|
install_files
|
||||||
install_ogrepo-api_service
|
install_ogrepo-api_service
|
||||||
|
configure_samba
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue