Skip to content
Snippets Groups Projects
Commit 9024576f authored by Elian Loraux's avatar Elian Loraux
Browse files

add basename

parent f70eea5b
No related branches found
No related tags found
1 merge request!17Reorganisation
#!/bin/bash
echo "============= $(basename "$0") ================="
backup_system=""
duplicity_dir="/opt/duplicity-ftp-backup/"
duplicity_alt_dir="/root/duplicity-ftp-backup/"
......
#!/bin/bash
echo "============= $(basename "$0") ================="
# Check if reeboot is requird
last_kernel="$(dpkg -l | awk '/linux-image-[0-9]/{print $2}' | sort -rn | head -n 1)"
running_kernel="linux-image-$(uname -r)"
......
#!/bin/bash
echo "============= $(basename "$0") ================="
if [ "${WEB_SERVER}" == "apache2" ]
then
apache2ctl -S 2>/dev/null | awk '/namevhost/{print "https://"$4}' | sort -u | grep -v "127.0...1"
......@@ -17,6 +20,3 @@ if id "dockerweb" >/dev/null 2>&1; then
echo "===== list of domain ===="
docker ps -qa | xargs docker inspect | awk '/traefik.http.routers.*.rule/{print $2}' | sed -e 's/^"Host(`//' -e 's/`)",//' -e 's/`,`/\n/g' | grep -v '!ClientIP' | sort -u
fi
#!/bin/bash
Subject: test\n\nCeci est un test" | sendmail -t root
echo "============= $(basename "$0") ================="
Subject: test\n\nCeci est un test" | sendmail -t root
#!/bin/bash
echo "============= $(basename "$0") ================="
# Check rootkits and antivirus
if [ `grep -c "^ALLOWHIDDENDIR=/etc/.java" /etc/rkhunter.conf` -eq 0 ]
then
......
#!/bin/bash
echo "============= $(basename "$0") ================="
if [ ! -e $(pwd)/$(dirname "$0")/../main.env ]
then
echo "Please copy in racine of NoCloud Auto Installer main.env.sample tomain.env and edit it"
echo "Please copy in racine of NoCloud Auto Installer main.env.sample to ain.env and edit it"
exit 1
fi
. $(pwd)/$(dirname "$0")/../main.env
......
......@@ -18,6 +18,8 @@
set -o nounset # Treat unset variables as an error
echo "============= $(basename "$0") ================="
if [ ! -e $(pwd)/$(dirname "$0")/../main.env ]
then
echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it"
......
......@@ -16,6 +16,7 @@
# You should have received a copy of the GNU General Public License # along
# with this program. If not, see <http://www.gnu.org/licenses/>.
echo "============= $(basename "$0") ================="
if [ ! -e $(pwd)/$(dirname "$0")/../main.env ]
then
......
......@@ -18,6 +18,8 @@
set -o nounset # Treat unset variables as an error
echo "============= $(basename "$0") ================="
if [ ! -e $(pwd)/$(dirname "$0")/../main.env ]
then
echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it"
......
......@@ -18,6 +18,8 @@
set -o nounset # Treat unset variables as an error
echo "============= $(basename "$0") ================="
if [ ! -e $(pwd)/$(dirname "$0")/../main.env ]
then
echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it"
......
#!/bin/bash
echo "============= $(basename "$0") ================="
cd /tmp
wget -O glpi.deb https://github.com/glpi-project/glpi-agent/releases/download/1.4/glpi-agent_1.4-1_all.deb
dpkg -i glpi.deb
......
#!/bin/bash
echo "============= $(basename "$0") ================="
if [ ! -e $(pwd)/$(dirname "$0")/../main.env ]
then
echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it"
......
......@@ -18,6 +18,8 @@
set -o nounset # Treat unset variables as an error
echo "============= $(basename "$0") ================="
if [ ! -e $(pwd)/$(dirname "$0")/../main.env ]
then
echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it"
......
......@@ -18,6 +18,8 @@
set -o nounset # Treat unset variables as an error
echo "============= $(basename "$0") ================="
if [ ! -e $(pwd)/$(dirname "$0")/../main.env ]
then
echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it"
......
......@@ -15,6 +15,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
echo "============= $(basename "$0") ================="
NEXTCLOUD_INSTALL_DIR="/var/www/nextcloud/"
APPS="tasks news talk calendar contacts impersonate"
......
#!/bin/bash
echo "============= $(basename "$0") ================="
if [ ! -e $(pwd)/$(dirname "$0")/../main.env ]
then
echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it"
......
......@@ -16,6 +16,7 @@
# You should have received a copy of the GNU General Public License # along
# with this program. If not, see <http://www.gnu.org/licenses/>.
echo "============= $(basename "$0") ================="
TB_CONFIG_ServerName=${TB_CONFIG_ServerName:-tetras-back.${DOMAIN}}
TB_CONFIG_ServerAdmin=${TB_CONFIG_ServerAdmin:-${SERVER_ADMIN}}
......
#!/bin/bash
echo "============= $(basename "$0") ================="
if [ ! -e $(pwd)/$(dirname "$0")/../main.env ]
then
echo "Please copy in racine of NoCloud Auto Installer main.env.sample to main.env and edit it"
......
......@@ -18,7 +18,7 @@
set -o nounset # Treat unset variables as an error
apt-get update
echo "============= $(basename "$0") ================="
if [ ! -e $(pwd)/$(dirname "$0")/../main.env ]
then
......@@ -27,6 +27,8 @@ then
fi
. $(pwd)/$(dirname "$0")/../main.env
apt-get update
if [ "${WEB_SERVER}" == "apache2" ]
then
export WEB_SERVER_PACKAGES="apache2"
......
#!/bin/bash
echo "============= $(basename "$0") ================="
# Install ncdu for disk usage analysis
if [ -z "$(dpkg -l | grep ncdu)" ]; then
apt-get update && apt-get install -y ncdu
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment