From 314997a6ae9cf6225993f94a3789289f260cca2c Mon Sep 17 00:00:00 2001 From: Draconis Date: Tue, 19 Feb 2019 13:19:26 +0100 Subject: [PATCH 01/17] new screenshot url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b8d4a60..d3f5f58 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Screenshot -![logo](https://labo.olivierdelort.net/olivier/motd/blob/master/screen_shot.jpg "Screenshot_blank") +![logo](https://framagit.org/draconis/motd/blob/master/screen_shot.jpg "Screenshot_blank") ## Configuration : From 57f1e9c8e21f1229729b80ea8e72682f9d0c0729 Mon Sep 17 00:00:00 2001 From: Draconis Date: Tue, 19 Feb 2019 13:20:54 +0100 Subject: [PATCH 02/17] new repo url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d3f5f58..8b77dd5 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Screenshot ## Install the developpment release ``` -git clone https://labo.olivierdelort.net/olivier/motd.git +git clone https://framagit.org/draconis/motd.git ``` Disable the SSH's motd From 80fa7d02c3ff2c38dada2e4f45df6b1706eadfc5 Mon Sep 17 00:00:00 2001 From: Draconis Date: Tue, 19 Feb 2019 13:22:09 +0100 Subject: [PATCH 03/17] new location --- source/coldmotd => coldmotd | 0 source/lxc => lxc | 0 source/motd-maint => motd-maint | 0 source/old_motd.tcl => old_motd.tcl | 0 source/openvz => openvz | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename source/coldmotd => coldmotd (100%) rename source/lxc => lxc (100%) mode change 100755 => 100644 rename source/motd-maint => motd-maint (100%) rename source/old_motd.tcl => old_motd.tcl (100%) rename source/openvz => openvz (100%) mode change 100755 => 100644 diff --git a/source/coldmotd b/coldmotd similarity index 100% rename from source/coldmotd rename to coldmotd diff --git a/source/lxc b/lxc old mode 100755 new mode 100644 similarity index 100% rename from source/lxc rename to lxc diff --git a/source/motd-maint b/motd-maint similarity index 100% rename from source/motd-maint rename to motd-maint diff --git a/source/old_motd.tcl b/old_motd.tcl similarity index 100% rename from source/old_motd.tcl rename to old_motd.tcl diff --git a/source/openvz b/openvz old mode 100755 new mode 100644 similarity index 100% rename from source/openvz rename to openvz From f4c3ecc0d6a42a7ef270d769e55e14e141032fd5 Mon Sep 17 00:00:00 2001 From: Draconis Date: Tue, 19 Feb 2019 13:23:03 +0100 Subject: [PATCH 04/17] new motd file name --- motd | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 motd diff --git a/motd b/motd new file mode 100644 index 0000000..d774a4c --- /dev/null +++ b/motd @@ -0,0 +1,33 @@ +#!/bin/bash +PROCCOUNT=`ps -Afl | wc -l` +PROCCOUNT=`expr $PROCCOUNT - 5` + +uptime=$( Date: Tue, 19 Feb 2019 13:27:35 +0100 Subject: [PATCH 05/17] initial commit --- install.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..e69de29 From ff6e46e7080fe4e2ed4984a7bfd4d99b941b3b39 Mon Sep 17 00:00:00 2001 From: Draconis Date: Tue, 19 Feb 2019 13:34:11 +0100 Subject: [PATCH 06/17] first code --- install.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/install.sh b/install.sh index e69de29..e5abf83 100644 --- a/install.sh +++ b/install.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +HOMEDIR=$HOME +USERNAME=$(whoami) + +USE_SUDO='' +if [ $USERNAME != "root" ]; +then + USE_SUDO="sudo " +fi + +# install the motd +cp motd /usr/local/bin/ +chmod +x /usr/local/bin/motd + +#install the maintenance file +cp motd-maint /etc/motd-maint From c1d432ecc0ef1ffa5fde13f5db4f8964204eca29 Mon Sep 17 00:00:00 2001 From: Draconis Date: Tue, 19 Feb 2019 13:43:31 +0100 Subject: [PATCH 07/17] initial commit --- install.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index e5abf83..bc7485a 100644 --- a/install.sh +++ b/install.sh @@ -10,8 +10,25 @@ then fi # install the motd +echo "Installing motd..." cp motd /usr/local/bin/ -chmod +x /usr/local/bin/motd +cp lxc /usr/local/bin/ + #install the maintenance file cp motd-maint /etc/motd-maint + +#Disable the motd in SSH Server +sed -i 's/#PrintMotd yes/PrintMotd no/g' /etc/ssh/sshd_config +#Enable motd for bash user +echo "/usr/local/bin/motd" > /etc/profile.d/motd.sh +chmod +x /etc/profile.d/motd.sh +# for zsh users +if [ -f "/usr/bin/zsh" ];then +echo "/usr/local/bin/motd" >> ~/.zprofile; +fi +#disable the system motd +echo "" > /etc/motd +chmod +x /usr/local/bin/motd +chmod +x /usr/local/bin/lxc +exit 0 From 2c60e17a82ec473d33dcda7a0cfee22bc7a8d535 Mon Sep 17 00:00:00 2001 From: Draconis Date: Tue, 19 Feb 2019 13:45:04 +0100 Subject: [PATCH 08/17] i don't use openvz anymore --- motd | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/motd b/motd index d774a4c..a1a290e 100644 --- a/motd +++ b/motd @@ -1,15 +1,15 @@ #!/bin/bash PROCCOUNT=`ps -Afl | wc -l` PROCCOUNT=`expr $PROCCOUNT - 5` - + uptime=$( Date: Tue, 19 Feb 2019 13:50:02 +0100 Subject: [PATCH 09/17] new url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b77dd5..7d026f4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Screenshot -![logo](https://framagit.org/draconis/motd/blob/master/screen_shot.jpg "Screenshot_blank") +![logo](/screen_shot.jpg "Screenshot_blank") ## Configuration : From 4e90f3f3efcd65920eef13b46c37e6ce56e868b5 Mon Sep 17 00:00:00 2001 From: Draconis Date: Tue, 19 Feb 2019 14:04:00 +0100 Subject: [PATCH 10/17] update readme --- README.md | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 7d026f4..6a41809 100644 --- a/README.md +++ b/README.md @@ -4,39 +4,26 @@ Screenshot ![logo](/screen_shot.jpg "Screenshot_blank") -## Configuration : +## Dependences : You have to install the rsb-release package to use it. ``` - sudo apt-get install lsb-release + sudo apt install lsb-release ``` -## Install the developpment release +## Install ``` git clone https://framagit.org/draconis/motd.git ``` -Disable the SSH's motd +Execute the installation's script ``` -sudo sed -i 's/#PrintMotd yes/PrintMotd no/g' /etc/ssh/sshd_config +sudo sh install.sh ``` -Enable the new motd at start session - -``` -sudo echo "/usr/local/bin/coldmotd" > /etc/profile.d/coldmotd.sh -sudo chmod +x /etc/profile.d/coldmotd.sh -``` - -Copy the new motd - -``` -sudo cp motd /usr/local/bin/ -sudo chmod +x /usr/local/bin/motd -``` # FOR ZSH USERS Just add this line "/usr/local/bin/motd" in your ~/.ZSHRC. It's recommanded to add it at the end of the file From b671079a8eb9d3b5c62a69eacf3f3a306d1855b6 Mon Sep 17 00:00:00 2001 From: Draconis Date: Tue, 19 Feb 2019 14:07:01 +0100 Subject: [PATCH 11/17] executable file --- install.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 install.sh diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 From 1c757a1fb3bbf8bce4518624fa9aa096dc3c4c69 Mon Sep 17 00:00:00 2001 From: Draconis Date: Tue, 19 Feb 2019 14:09:32 +0100 Subject: [PATCH 12/17] set environment --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index bc7485a..34ed1e6 100644 --- a/install.sh +++ b/install.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/bash HOMEDIR=$HOME USERNAME=$(whoami) From db05308cba24f5fb072c6de4fd47bd939685174e Mon Sep 17 00:00:00 2001 From: Draconis Date: Tue, 19 Feb 2019 14:13:15 +0100 Subject: [PATCH 13/17] root priviliges --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 34ed1e6..ac6b451 100755 --- a/install.sh +++ b/install.sh @@ -3,11 +3,11 @@ HOMEDIR=$HOME USERNAME=$(whoami) -USE_SUDO='' +#USE_SUDO='' if [ $USERNAME != "root" ]; then - USE_SUDO="sudo " -fi + echo "run this script with root priviliges !" +else # install the motd echo "Installing motd..." @@ -31,4 +31,4 @@ fi echo "" > /etc/motd chmod +x /usr/local/bin/motd chmod +x /usr/local/bin/lxc -exit 0 +fi From ce9398d2b0ebfa07e649567db65a320128b41828 Mon Sep 17 00:00:00 2001 From: Draconis Date: Tue, 19 Feb 2019 14:14:55 +0100 Subject: [PATCH 14/17] root again --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index ac6b451..045583f 100755 --- a/install.sh +++ b/install.sh @@ -6,7 +6,7 @@ USERNAME=$(whoami) #USE_SUDO='' if [ $USERNAME != "root" ]; then - echo "run this script with root priviliges !" + echo "YOU HAVE TO RUN THE SCRIPT WITH ROOT PRIVILEGES !" else # install the motd From 1808fb8c3e6622067d92fc3a88da64f59860fc8f Mon Sep 17 00:00:00 2001 From: Draconis Date: Tue, 19 Feb 2019 14:16:06 +0100 Subject: [PATCH 15/17] border root privileges --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 045583f..7ebb31d 100755 --- a/install.sh +++ b/install.sh @@ -6,7 +6,9 @@ USERNAME=$(whoami) #USE_SUDO='' if [ $USERNAME != "root" ]; then - echo "YOU HAVE TO RUN THE SCRIPT WITH ROOT PRIVILEGES !" + echo "**************************************************" + echo "*YOU HAVE TO RUN THE SCRIPT WITH ROOT PRIVILEGES!*" + echo "**************************************************" else # install the motd From 1826e88e812e649697abd389642c59fd4ee9326c Mon Sep 17 00:00:00 2001 From: Draconis Date: Tue, 19 Feb 2019 14:21:40 +0100 Subject: [PATCH 16/17] not used --- coldmotd | 33 ------------ source/debian/changelog | 108 ---------------------------------------- source/debian/compat | 1 - source/debian/control | 12 ----- source/debian/copyright | 21 -------- source/debian/postinst | 15 ------ source/debian/rules | 36 -------------- 7 files changed, 226 deletions(-) delete mode 100644 coldmotd delete mode 100644 source/debian/changelog delete mode 100644 source/debian/compat delete mode 100644 source/debian/control delete mode 100644 source/debian/copyright delete mode 100644 source/debian/postinst delete mode 100755 source/debian/rules diff --git a/coldmotd b/coldmotd deleted file mode 100644 index d774a4c..0000000 --- a/coldmotd +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -PROCCOUNT=`ps -Afl | wc -l` -PROCCOUNT=`expr $PROCCOUNT - 5` - -uptime=$( Fri, 23 Oct 2015 11:18:00 +0100 - -coldmotd (1.6) stable; urgency=low - - * obsolete ifconfig fixed by ip addr show - - -- Olivier Delort Wed, 21 Oct 2015 00:56:00 +0100 - -coldmotd (1.5) stable; urgency=low - - * back to the first install for zsh users - - -- Olivier Delort Wed, 21 Oct 2015 00:13:00 +0100 - -coldmotd (1.4) stable; urgency=low - - * message for zsh most viewer - - -- Olivier Delort Wed, 21 Oct 2015 00:13:00 +0100 - -coldmotd (1.3) stable; urgency=low - - * pause in postintall file fixed - - -- Olivier Delort Wed, 21 Oct 2015 00:07:00 +0100 - -coldmotd (1.2) stable; urgency=low - - * installation fixed fir zsh users - - -- Olivier Delort Wed, 21 Oct 2015 00:03:00 +0100 - -coldmotd (1.1) stable; urgency=low - - * use space disk for root partition added - * container space disk use for openvz and lxc - - -- Olivier Delort Tue, 20 Oct 2015 23:42:00 +0100 - -coldmotd (1.0) stable; urgency=low - - * new code - * Most simply to configure and install - - -- Olivier Delort Thu, 25 Jun 2015 06:56:00 +0100 - -coldmotd (1.0.1) stable; urgency=low - - * new layout - - -- Olivier Delort Mon, 28 Apr 2014 13:12:00 +0100 - -coldmotd (1.0.0) unstable; urgency=low - - * disk usage deleted - * warning message deleted - * new ascii logo - * first stable version 1.0.0 - - -- Olivier Delort Mon, 28 Apr 2014 13:12:00 +0100 - - -coldmotd (0.1-beta5) unstable; urgency=low - - * new logo. - - - -- Olivier Delort Fri, 21 Mar 2014 14:12:00 +0100 - -coldmotd (0.1-beta4) unstable; urgency=low - - * motd.tcl right configured at the end of the postinst. - - - -- Olivier Delort Fri, 21 Mar 2014 14:12:00 +0100 - -coldmotd (0.1-beta3) unstable; urgency=low - - * fi function was forgoten. - - - -- Olivier Delort Fri, 21 Mar 2014 11:56:00 +0100 - - -coldmotd (0.1-beta2) unstable; urgency=low - - * exit 0 added at the end of the postinst file. - - - -- Olivier Delort Fri, 21 Mar 2014 11:56:00 +0100 - -coldmotd (0.1-beta1) unstable; urgency=low - - * postinst file added to install new bootlogs file. - - - -- Olivier Delort Fri, 21 Mar 2014 10:56:00 +0100 - -coldmotd (0.1) unstable; urgency=low - - * Initial release. - - - -- Olivier Delort Fri, 21 Mar 2014 06:56:00 +0100 diff --git a/source/debian/compat b/source/debian/compat deleted file mode 100644 index 7ed6ff8..0000000 --- a/source/debian/compat +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/source/debian/control b/source/debian/control deleted file mode 100644 index ecbca1b..0000000 --- a/source/debian/control +++ /dev/null @@ -1,12 +0,0 @@ -Source: coldmotd -Section: misc -Priority: extra -Maintainer: Olivier Delort -Build-Depends: debhelper (>= 5.0.0) -Standards-Version: 1.7 -Homepage: http://wiki-colmaris.olivierdelort.net - -Package: coldmotd -Architecture: all -Depends: lsb-release -Description: Configuration for the message of the day colmaris's server. diff --git a/source/debian/copyright b/source/debian/copyright deleted file mode 100644 index 6219e9b..0000000 --- a/source/debian/copyright +++ /dev/null @@ -1,21 +0,0 @@ -This package was debianized by Olivier Delort -Fri, 21 Mar 2014 06:59:00 +0100 - -Copyright: - Packaging copyright © 2014 Olivier Delort - Writting copyright © 2014 Olivier Delort - -License: - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/source/debian/postinst b/source/debian/postinst deleted file mode 100644 index 8741621..0000000 --- a/source/debian/postinst +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -#Disable the motd in SSH Server -sed -i 's/#PrintMotd yes/PrintMotd no/g' /etc/ssh/sshd_config -#Enable motd for bash user -echo "/usr/local/bin/coldmotd" > /etc/profile.d/coldmotd.sh -chmod +x /etc/profile.d/coldmotd.sh -# for zsh users -if [ -f "/usr/bin/zsh" ];then -echo "/usr/local/bin/coldmotd" >> ~/.zprofile; -fi -#disable the system motd -echo "" > /etc/motd -chmod +x /usr/local/bin/coldmotd -exit 0 diff --git a/source/debian/rules b/source/debian/rules deleted file mode 100755 index c0bfaa6..0000000 --- a/source/debian/rules +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/make -f - -build: - -build-arch: - -build-indep: - -clean: - dh_testdir - dh_testroot - dh_clean - -install: - dh_install coldmotd /usr/local/bin - dh_install motd-maint /etc/ - dh_install openvz /usr/local/bin - dh_install lxc /usr/local/bin - dh_testdir - dh_testroot -binary-arch: - -binary-indep: install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_fixperms - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch - -.PHONY: clean install binary-arch binary-indep binary From 580261f9a49b129291ca10df72ea22029f6dce7f Mon Sep 17 00:00:00 2001 From: Draconis Date: Tue, 19 Feb 2019 14:30:26 +0100 Subject: [PATCH 17/17] wrong word --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a41809..b3ee43f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Screenshot ![logo](/screen_shot.jpg "Screenshot_blank") -## Dependences : +## Dependencies : You have to install the rsb-release package to use it.