Skip to content

Commit

Permalink
Merge pull request #9 from vroncevic/dev
Browse files Browse the repository at this point in the history
[samba_manager] refactor done based on latest changes sh_util, update…
  • Loading branch information
vroncevic committed Jun 13, 2021
2 parents 6ce389d + 511aff1 commit e79df3c
Show file tree
Hide file tree
Showing 39 changed files with 149 additions and 277 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions .github/workflows/samba_manager_docker_checker.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: samba_manager docker checker

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/samba_manager_shell_checker.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: samba_manager shell checker

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/samba_manager_toc.yaml → .github/workflows/samba_manager_toc.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: samba_manager toc

on: push

jobs:
generateTOC:
name: TOC Generator
Expand Down
Empty file modified .gitignore
100755 → 100644
Empty file.
Empty file modified .readthedocs.yml
100755 → 100644
Empty file.
19 changes: 10 additions & 9 deletions Dockerfile
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2015 Vladimir Roncevic <elektron.ronca@gmail.com>
# Copyright 2016 Vladimir Roncevic <elektron.ronca@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,8 @@

FROM debian:10
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
RUN DEBIAN_FRONTEND=noninteractive \
apt-get install -yq --no-install-recommends \
tree \
htop \
wget \
Expand All @@ -24,14 +25,14 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
openssl \
samba

RUN wget https://github.com/vroncevic/sh_util/archive/v1.0.0.zip
RUN unzip v1.0.0.zip
RUN find /sh_util-1.0.0/ -name "*.editorconfig" -type f -exec rm -Rf {} \;
RUN wget https://github.com/vroncevic/sh_util/archive/v1.0.zip
RUN unzip v1.0.zip
RUN find /sh_util-1.0/ -name "*.editorconfig" -type f -exec rm -Rf {} \;
RUN mkdir -p /root/scripts/sh_util/ver.1.0/
RUN cp -R /sh_util-1.0.0/sh_tool/bin/ /root/scripts/sh_util/ver.1.0/
RUN cp -R /sh_util-1.0.0/sh_tool/conf/ /root/scripts/sh_util/ver.1.0/
RUN cp -R /sh_util-1.0.0/sh_tool/log/ /root/scripts/sh_util/ver.1.0/
RUN rm -Rf v1.0.0.zip sh_util-1.0.0
RUN cp -R /sh_util-1.0/sh_tool/bin/ /root/scripts/sh_util/ver.1.0/
RUN cp -R /sh_util-1.0/sh_tool/conf/ /root/scripts/sh_util/ver.1.0/
RUN cp -R /sh_util-1.0/sh_tool/log/ /root/scripts/sh_util/ver.1.0/
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 {} \;
Expand Down
Empty file modified LICENSE
100755 → 100644
Empty file.
20 changes: 11 additions & 9 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<img align="right" src="https://raw.githubusercontent.com/vroncevic/samba_manager/dev/docs/samba_manager_logo.png" width="25%">

# Samba server management

**samba_manager** is shell tool for control/operating Samba Server.
Expand Down Expand Up @@ -32,11 +34,11 @@ Navigate to release **[page](https://github.com/vroncevic/samba_manager/releases
To install **samba_manager** type the following:

```
tar xvzf samba_manager-x.y.z.tar.gz
cd samba_manager-x.y.z
cp -R ~/sh_tool/bin/ /root/scripts/samba_manager/ver.1.0/
cp -R ~/sh_tool/conf/ /root/scripts/samba_manager/ver.1.0/
cp -R ~/sh_tool/log/ /root/scripts/samba_manager/ver.1.0/
tar xvzf samba_manager-x.y.tar.gz
cd samba_manager-x.y
cp -R ~/sh_tool/bin/ /root/scripts/samba_manager/ver.x.y/
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)
Expand All @@ -49,7 +51,7 @@ Or You can use docker to create image/container.

```
# Create symlink for shell tool
ln -s /root/scripts/samba_manager/ver.1.0/bin/samba_manager.sh /root/bin/samba_manager
ln -s /root/scripts/samba_manager/ver.x.y/bin/samba_manager.sh /root/bin/samba_manager
# Setting PATH
export PATH=${PATH}:/root/bin/
Expand All @@ -61,15 +63,15 @@ samba_manager version
### Dependencies

**samba_manager** requires next modules and libraries:
* sh_util [https://github.com/vroncevic/sh_util](https://github.com/vroncevic/sh_util)
* 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:
```
.
sh_tool/
├── bin/
│   ├── nmb_operation.sh
│   ├── samba_manager.sh
Expand Down Expand Up @@ -97,7 +99,7 @@ More documentation and info at:

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Copyright (C) 2015 by [vroncevic.github.io/samba_manager](https://vroncevic.github.io/samba_manager)
Copyright (C) 2016 by [vroncevic.github.io/samba_manager](https://vroncevic.github.io/samba_manager)

**samba_manager** is free software; you can redistribute it and/or modify
it under the same terms as Bash itself, either Bash version 4.2.47 or,
Expand Down
Empty file modified _config.yml
100755 → 100644
Empty file.
9 changes: 1 addition & 8 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
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: 4b2b54739b9ea8a04cddd1d98456cd77
config: 8ce92614277c37bc89d64554d2254f5a
tags: 645f666f9bcd5a90fca523b33c5a78b7
14 changes: 7 additions & 7 deletions docs/build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ To install **samba_manager** type the following:

.. code-block:: bash
tar xvzf samba_manager-x.y.z.tar.gz
cd samba_manager-x.y.z
cp -R ~/sh_tool/bin/ /root/scripts/samba_manager/ver.1.0/
cp -R ~/sh_tool/conf/ /root/scripts/samba_manager/ver.1.0/
cp -R ~/sh_tool/log/ /root/scripts/samba_manager/ver.1.0/
tar xvzf samba_manager-x.y.tar.gz
cd samba_manager-x.y
cp -R ~/sh_tool/bin/ /root/scripts/samba_manager/ver.x.y/
cp -R ~/sh_tool/conf/ /root/scripts/samba_manager/ver.x.y/
cp -R ~/sh_tool/log/ /root/scripts/samba_manager/ver.x.y/
Or You can use Docker to create image/container.

Expand All @@ -70,7 +70,7 @@ Code structure:

.. code-block:: bash
.
sh_tool/
├── bin/
│   ├── nmb_operation.sh
│   ├── samba_manager.sh
Expand All @@ -96,7 +96,7 @@ Copyright and licence
.. |License: Apache 2.0| image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg
:target: https://opensource.org/licenses/Apache-2.0

Copyright (C) 2015 by `vroncevic.github.io/samba_manager <https://vroncevic.github.io/samba_manager>`_
Copyright (C) 2016 by `vroncevic.github.io/samba_manager <https://vroncevic.github.io/samba_manager>`_

**samba_manager** is free software; you can redistribute it and/or modify it
under the same terms as Bash itself, either Bash version 4.2.47 or,
Expand Down
80 changes: 39 additions & 41 deletions docs/build/html/_static/jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2019-04-19T06:52Z
* Date: 2021-03-09T19:42Z
*/
( function( global, factory ) {

Expand Down Expand Up @@ -4676,11 +4676,40 @@ var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );



// We have to close these tags to support XHTML (#13200)
var wrapMap = {
( function() {
var fragment = document.createDocumentFragment(),
div = fragment.appendChild( document.createElement( "div" ) ),
input = document.createElement( "input" );

// Support: Android 4.0 - 4.3 only
// Check state lost if the name is set (#11217)
// Support: Windows Web Apps (WWA)
// `name` and `type` must use .setAttribute for WWA (#14901)
input.setAttribute( "type", "radio" );
input.setAttribute( "checked", "checked" );
input.setAttribute( "name", "t" );

div.appendChild( input );

// Support: Android <=4.1 only
// Older WebKit doesn't clone checked state correctly in fragments
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;

// Support: IE <=11 only
// Make sure textarea (and checkbox) defaultValue is properly cloned
div.innerHTML = "<textarea>x</textarea>";
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;

// Support: IE <=9 only
option: [ 1, "<select multiple='multiple'>", "</select>" ],
// IE <=9 replaces <option> tags with their contents when inserted outside of
// the select element.
div.innerHTML = "<option></option>";
support.option = !!div.lastChild;
} )();


// We have to close these tags to support XHTML (#13200)
var wrapMap = {

// XHTML parsers do not magically insert elements in the
// same way that tag soup parsers do. So we cannot shorten
Expand All @@ -4693,12 +4722,14 @@ var wrapMap = {
_default: [ 0, "", "" ]
};

// Support: IE <=9 only
wrapMap.optgroup = wrapMap.option;

wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;

// Support: IE <=9 only
if ( !support.option ) {
wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ];
}


function getAll( context, tag ) {

Expand Down Expand Up @@ -4829,32 +4860,6 @@ function buildFragment( elems, context, scripts, selection, ignored ) {

return fragment;
}


( function() {
var fragment = document.createDocumentFragment(),
div = fragment.appendChild( document.createElement( "div" ) ),
input = document.createElement( "input" );

// Support: Android 4.0 - 4.3 only
// Check state lost if the name is set (#11217)
// Support: Windows Web Apps (WWA)
// `name` and `type` must use .setAttribute for WWA (#14901)
input.setAttribute( "type", "radio" );
input.setAttribute( "checked", "checked" );
input.setAttribute( "name", "t" );

div.appendChild( input );

// Support: Android <=4.1 only
// Older WebKit doesn't clone checked state correctly in fragments
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;

// Support: IE <=11 only
// Make sure textarea (and checkbox) defaultValue is properly cloned
div.innerHTML = "<textarea>x</textarea>";
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
} )();
var documentElement = document.documentElement;


Expand Down Expand Up @@ -5591,13 +5596,6 @@ jQuery.fn.extend( {

var

/* eslint-disable max-len */

// See https://github.com/eslint/eslint/issues/3229
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,

/* eslint-enable */

// Support: IE <=10 - 11, Edge 12 - 13 only
// In IE/Edge using regex groups here causes severe slowdowns.
// See https://connect.microsoft.com/IE/feedback/details/1736512/
Expand Down Expand Up @@ -5794,7 +5792,7 @@ function remove( elem, selector, keepData ) {

jQuery.extend( {
htmlPrefilter: function( html ) {
return html.replace( rxhtmlTag, "<$1></$2>" );
return html;
},

clone: function( elem, dataAndEvents, deepDataAndEvents ) {
Expand Down
23 changes: 19 additions & 4 deletions docs/build/html/_static/underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,13 @@
return '\\' + escapes[match];
};

// In order to prevent third-party code injection through
// `_.templateSettings.variable`, we test it against the following regular
// expression. It is intentionally a bit more liberal than just matching valid
// identifiers, but still prevents possible loopholes through defaults or
// destructuring assignment.
var bareIdentifier = /^\s*(\w|\$)+\s*$/;

// JavaScript micro-templating, similar to John Resig's implementation.
// Underscore templating handles arbitrary delimiters, preserves whitespace,
// and correctly escapes quotes within interpolated code.
Expand Down Expand Up @@ -1585,16 +1592,25 @@
});
source += "';\n";

// If a variable is not specified, place data values in local scope.
if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
var argument = settings.variable;
if (argument) {
// Insure against third-party code injection.
if (!bareIdentifier.test(argument)) throw new Error(
'variable is not a bare identifier: ' + argument
);
} else {
// If a variable is not specified, place data values in local scope.
source = 'with(obj||{}){\n' + source + '}\n';
argument = 'obj';
}

source = "var __t,__p='',__j=Array.prototype.join," +
"print=function(){__p+=__j.call(arguments,'');};\n" +
source + 'return __p;\n';

var render;
try {
render = new Function(settings.variable || 'obj', '_', source);
render = new Function(argument, '_', source);
} catch (e) {
e.source = source;
throw e;
Expand All @@ -1605,7 +1621,6 @@
};

// Provide the compiled source as a convenience for precompilation.
var argument = settings.variable || 'obj';
template.source = 'function(' + argument + '){\n' + source + '}';

return template;
Expand Down
6 changes: 5 additions & 1 deletion docs/build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@



<div class="version">
1.0
</div>




Expand Down Expand Up @@ -165,7 +169,7 @@ <h1 id="index">Index</h1>
<div role="contentinfo">
<p>

&copy; Copyright 2020, Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;
&copy; Copyright 2016, Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;

</p>
</div>
Expand Down

0 comments on commit e79df3c

Please sign in to comment.