Fix wrong instaces of username for #1132

pull/3/head
Nicolas Arenas 2024-11-13 13:10:26 +01:00
parent bac07800b4
commit 7a7565de7f
1 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@ clone_repository() {
local BRANCH=$1
rm -rf $DOWNLOAD_DIR
git clone -b "$BRANCH" $GIT_REPO $DOWNLOAD_DIR
chown -R ogrepository:ogrepository $DOWNLOAD_DIR
chown -R $OGUSER:$OGUSER $DOWNLOAD_DIR
}
check_root() {
@ -43,7 +43,7 @@ add_user_ogrepository() {
fi
if [ ! -f /etc/sudoers.d/$OGUSER ]; then
echo "User $OGUSER does not have sudo permissions, adding it"
echo 'ogrepository ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/"$OGUSER"
echo "$OGUSER ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/"$OGUSER"
fi
}
@ -51,7 +51,7 @@ add_user_ogrepository() {
create_directories() {
mkdir -p $INSTALL_DIR
mkdir -p $INSTALL_DIR/images $INSTALL_DIR/images_trash/ $INSTALL_DIR/bin/ $INSTALL_DIR/etc/ $INSTALL_DIR/log/ $INSTALL_DIR/api/
chown -R ogrepository:ogrepository $INSTALL_DIR
chown -R $OGUSER:$OGUSER $INSTALL_DIR
}
install_dependencies() {
@ -77,9 +77,9 @@ install_files() {
cp -pr $DOWNLOAD_DIR/bin/* $INSTALL_DIR/bin/
cp -pr $DOWNLOAD_DIR/etc/* $INSTALL_DIR/etc/
cp -pr $DOWNLOAD_DIR/api/* $INSTALL_DIR/api/
chown -R ogrepository:ogrepository $INSTALL_DIR
chown -R $OGUSER:$OGUSER $INSTALL_DIR
echo IPlocal="$REPO_IP" > $INSTALL_DIR/etc/ogAdmRepo.cfg
sudo chown ogrepository:ogrepository $INSTALL_DIR/etc/ogAdmRepo.cfg
sudo chown $OGUSER:$OGUSER $INSTALL_DIR/etc/ogAdmRepo.cfg
}
configure_samba() {