Skip to content

Commit

Permalink
Merge pull request #11 from vroncevic/dev
Browse files Browse the repository at this point in the history
[samba_manager] refactor done, updated Dockerfile, docs
  • Loading branch information
vroncevic committed Nov 25, 2021
2 parents 02f21ac + 5ceed31 commit 9141e40
Show file tree
Hide file tree
Showing 97 changed files with 13,687 additions and 16,156 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
__pycache__/
*.py[cod]
*$py.class
.idea/
.vscode/
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
python:
version: 2.7
version: '3.7'
sphinx:
configuration: docs/source/conf.py
formats: all
30 changes: 15 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
FROM debian:10
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive \
apt-get install -yq --no-install-recommends \
tree \
htop \
wget \
unzip \
ca-certificates \
openssl \
samba
apt-get install -yq --no-install-recommends \
tree \
htop \
wget \
unzip \
ca-certificates \
openssl \
samba

RUN wget https://github.com/vroncevic/sh_util/archive/v1.0.zip
RUN unzip v1.0.zip
Expand All @@ -36,12 +36,12 @@ RUN rm -Rf v1.0.zip sh_util-1.0
RUN mkdir /sh_tool/
COPY sh_tool /sh_tool/
RUN find /sh_tool/ -name "*.editorconfig" -type f -exec rm -Rf {} \;
RUN mkdir -p /root/scripts/samba_manager/ver.1.0/
RUN mkdir -p /root/scripts/samba_manager/ver.2.0/
RUN mkdir /root/bin/
RUN cp -R /sh_tool/bin/ /root/scripts/samba_manager/ver.1.0/
RUN cp -R /sh_tool/conf/ /root/scripts/samba_manager/ver.1.0/
RUN cp -R /sh_tool/log/ /root/scripts/samba_manager/ver.1.0/
RUN cp -R /sh_tool/bin/ /root/scripts/samba_manager/ver.2.0/
RUN cp -R /sh_tool/conf/ /root/scripts/samba_manager/ver.2.0/
RUN cp -R /sh_tool/log/ /root/scripts/samba_manager/ver.2.0/
RUN rm -Rf /sh_tool/
RUN chmod -R 755 /root/scripts/samba_manager/ver.1.0/
RUN ln -s /root/scripts/samba_manager/ver.1.0/bin/samba_manager.sh /root/bin/samba_manager
RUN tree /root/scripts/samba_manager/ver.1.0/
RUN chmod -R 755 /root/scripts/samba_manager/ver.2.0/
RUN ln -s /root/scripts/samba_manager/ver.2.0/bin/samba_manager.sh /root/bin/samba_manager
RUN tree /root/scripts/samba_manager/ver.2.0/
78 changes: 71 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ other information that should be provided before the tool is installed.

### Installation

![Debian Linux OS](https://raw.githubusercontent.com/vroncevic/samba_manager/dev/docs/debtux.png)

Navigate to release **[page](https://github.com/vroncevic/samba_manager/releases)** download and extract release archive.

To install **samba_manager** type the following:
To install **samba_manager** type the following

```
tar xvzf samba_manager-x.y.tar.gz
Expand All @@ -41,7 +43,40 @@ cp -R ~/sh_tool/conf/ /root/scripts/samba_manager/ver.x.y/
cp -R ~/sh_tool/log/ /root/scripts/samba_manager/ver.x.y/
```

![alt tag](https://raw.githubusercontent.com/vroncevic/samba_manager/dev/docs/setup_tree.png)
Self generated setup script and execution
```
./samba_manager_setup.sh
[setup] installing App/Tool/Script samba_manager
Thu 25 Nov 2021 08:49:54 PM CET
[setup] clean up App/Tool/Script structure
[setup] copy App/Tool/Script structure
[setup] remove github editor configuration files
[setup] set App/Tool/Script permission
[setup] create symbolic link of App/Tool/Script
[setup] done
/root/scripts/samba_manager/ver.2.0/
├── bin/
│   ├── center.sh
│   ├── display_logo.sh
│   ├── nmb_operation.sh
│   ├── samba_manager.sh
│   ├── smb_info.sh
│   ├── smb_list.sh
│   ├── smb_operation.sh
│   ├── smb_version.sh
│   └── winbind_operation.sh
├── conf/
│   ├── samba_manager.cfg
│   ├── samba_manager.logo
│   └── samba_manager_util.cfg
└── log/
└── samba_manager.log
3 directories, 13 files
lrwxrwxrwx 1 root root 56 Nov 25 20:49 /root/bin/samba_manager -> /root/scripts/samba_manager/ver.2.0/bin/samba_manager.sh
```

Or You can use docker to create image/container.

Expand All @@ -56,23 +91,51 @@ ln -s /root/scripts/samba_manager/ver.x.y/bin/samba_manager.sh /root/bin/samba_m
# Setting PATH
export PATH=${PATH}:/root/bin/
# Control/operating Samba Server
samba_manager version
# Available options
samba_manager
samba_manager ver.2.0
Thu Nov 25 20:51:21 UTC 2021
[check_root] Check permission for current session? [ok]
[check_root] Done
_
___ __ _ _ __ ___ | |__ __ _ _ __ ___ __ _ _ __ __ _ __ _ ___ _ __
/ __|/ _` | '_ ` _ \| '_ \ / _` | | '_ ` _ \ / _` | '_ \ / _` |/ _` |/ _ \ '__|
\__ \ (_| | | | | | | |_) | (_| | | | | | | | (_| | | | | (_| | (_| | __/ |
|___/\__,_|_| |_| |_|_.__/ \__,_| |_| |_| |_|\__,_|_| |_|\__,_|\__, |\___|_|
|___/
Info github.io/samba_manager ver.2.0
Issue github.io/issue
Author vroncevic.github.io
[USAGE] samba_manager [OPTIONS]
[OPTIONS]
[PR] smb | nmb | winbind | all
[OP] start | stop | restart | status | version
# Restart smb service
samba_manager smb restart
[help | h] print this option
```

### Dependencies

**samba_manager** requires next modules and libraries:
**samba_manager** requires next modules and libraries
* samba_manager [https://github.com/vroncevic/samba_manager](https://github.com/vroncevic/samba_manager)

### Shell tool structure

**samba_manager** is based on MOP.

Code structure:
Shell tool structure
```
sh_tool/
├── bin/
│   ├── center.sh
│   ├── display_logo.sh
│   ├── nmb_operation.sh
│   ├── samba_manager.sh
│   ├── smb_info.sh
Expand All @@ -82,6 +145,7 @@ sh_tool/
│   └── winbind_operation.sh
├── conf/
│   ├── samba_manager.cfg
│   ├── samba_manager.logo
│   └── samba_manager_util.cfg
└── log/
└── samba_manager.log
Expand All @@ -91,7 +155,7 @@ sh_tool/

[![Documentation Status](https://readthedocs.org/projects/samba_manager/badge/?version=latest)](https://samba_manager.readthedocs.io/projects/samba_manager/en/latest/?badge=latest)

More documentation and info at:
More documentation and info at
* [https://samba_manager.readthedocs.io/en/latest/](https://samba_manager.readthedocs.io/en/latest/)
* [https://www.gnu.org/software/bash/manual/](https://www.gnu.org/software/bash/manual/)

Expand Down
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/index.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 8ce92614277c37bc89d64554d2254f5a
config: a3396a558f4feb5fc9735ec94a628ffe
tags: 645f666f9bcd5a90fca523b33c5a78b7
14 changes: 11 additions & 3 deletions docs/build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ other information that should be provided before the tool is installed.
Installation
-------------

|Debian Linux OS|

.. |Debian Linux OS| image:: https://raw.githubusercontent.com/vroncevic/samba_manager/dev/docs/debtux.png
:target: https://www.debian.org

Navigate to release `page`_ download and extract release archive.

.. _page: https://github.com/vroncevic/samba_manager/releases

To install **samba_manager** type the following:
To install **samba_manager** type the following

.. code-block:: bash
Expand All @@ -57,7 +62,7 @@ Or You can use Docker to create image/container.
Dependencies
-------------

**samba_manager** requires next modules and libraries:
**samba_manager** requires next modules and libraries

* sh_util `https://github.com/vroncevic/sh_util <https://github.com/vroncevic/sh_util>`_

Expand All @@ -66,12 +71,14 @@ Shell tool structure

**samba_manager** is based on MOP.

Code structure:
Shell tool structure

.. code-block:: bash
sh_tool/
├── bin/
│   ├── center.sh
│   ├── display_logo.sh
│   ├── nmb_operation.sh
│   ├── samba_manager.sh
│   ├── smb_info.sh
Expand All @@ -81,6 +88,7 @@ Code structure:
│   └── winbind_operation.sh
├── conf/
│   ├── samba_manager.cfg
│   ├── samba_manager.logo
│   └── samba_manager_util.cfg
└── log/
└── samba_manager.log
Expand Down
Binary file removed docs/build/html/_static/ajax-loader.gif
Binary file not shown.

0 comments on commit 9141e40

Please sign in to comment.