fix
This commit is contained in:
parent
394ed1bb7a
commit
ce7670eccd
5
make
5
make
|
@ -13,7 +13,4 @@ NEW_VERSION=$(echo $VERSION | awk 'BEGIN { FS="." } { $2++; if ($2 > 99) { $2=0
|
||||||
|
|
||||||
sed -i -e "s/$(echo $VERSION)/$(echo $NEW_VERSION)/" src/$PROJECT/DEBIAN/control
|
sed -i -e "s/$(echo $VERSION)/$(echo $NEW_VERSION)/" src/$PROJECT/DEBIAN/control
|
||||||
|
|
||||||
fakeroot dpkg-deb -Z gzip --build src/$PROJECT alldebfiles/$PROJECT.deb
|
fakeroot dpkg-deb -Z gzip --build src/$PROJECT alldebfiles/${PROJECT}_${NEW_VERSION}.deb
|
||||||
reprepro --ask-passphrase -Vb repository/ remove tools ${PROJECT%.*}
|
|
||||||
reprepro --ask-passphrase -Vb repository/ includedeb tools alldebfiles/$PROJECT.deb
|
|
||||||
rsync --delete -av -e "ssh -A -J lgy.fr " repository/* deb.net.lgy.fr:/var/www/html/
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: 2sman-client
|
Package: 2sman-client
|
||||||
Version: 1.04
|
Version: 1.07
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
2smanc (0.1) stable; urgency=low
|
||||||
|
|
||||||
|
* Create
|
||||||
|
|
||||||
|
-- Legay Thomas <thomas@syngate.fr> mar. 28 avril 2020 10:55
|
|
@ -0,0 +1,2 @@
|
||||||
|
/etc/default/2smanc
|
||||||
|
/etc/2smanc/config/check_process.conf
|
|
@ -0,0 +1,8 @@
|
||||||
|
Package: 2smanc
|
||||||
|
Version: 0.19
|
||||||
|
Section: base
|
||||||
|
Priority: optional
|
||||||
|
Architecture: all
|
||||||
|
Depends: wget, ca-certificates, jq
|
||||||
|
Maintainer: Thomas Legay <thomas@syngate.fr>
|
||||||
|
Description: Package 2smanc
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/2smanc/scripts/check_process
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/2smanc/scripts/diskspace
|
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/2smanc/scripts/loadavg
|
|
@ -0,0 +1,3 @@
|
||||||
|
SHELL=/bin/bash
|
||||||
|
PATH=/usr/bin:/bin/
|
||||||
|
*/5 * * * * root sleep ${RANDOM:0:1}s ; /usr/bin/2smanc run
|
|
@ -0,0 +1,2 @@
|
||||||
|
GOTIFY=
|
||||||
|
TOKEN=
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash
|
||||||
|
. /etc/default/2smanc
|
||||||
|
|
||||||
|
[ "$TOKEN" == "" ] && exit
|
||||||
|
[ "$GOTIFY" == "" ] && exit
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
run)
|
||||||
|
[ "$(/usr/bin/find /etc/2smanc/enable/ -type l,f | wc -l)" -eq 0 ] && exit
|
||||||
|
/usr/bin/wget "${GOTIFY}/message?token=${TOKEN}" --post-data="message=$(/usr/bin/find /etc/2smanc/enable/ -type f,l -exec {} \;| /usr/bin/jq -sr @uri)" -qO - > /dev/null ;;
|
||||||
|
list)
|
||||||
|
ls /usr/share/2smanc/scripts/
|
||||||
|
;;
|
||||||
|
active)
|
||||||
|
ls /etc/2smanc/enable/
|
||||||
|
;;
|
||||||
|
enable)
|
||||||
|
[ -e "/usr/share/2smanc/scripts/$2" ] && ln -s "/usr/share/2smanc/scripts/$2" "/etc/2smanc/enable/$2" || echo "scripts do not exists in /usr/share/2smanc/scripts/"
|
||||||
|
;;
|
||||||
|
disable)
|
||||||
|
rm -fr /etc/2smanc/enable/$2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "2smanc [list|active|run] [enable|disable] <script>"
|
||||||
|
esac
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
cat /etc/2smanc/config/check_process.conf | awk 'BEGIN {printf "{\"check_process\":[" }{ if(a) printf","; print "{\""$1"\":" ; system("ps -C "$1" -o pid | tail -n +2 | wc -l");print "}" ; a++ }END {print"]}";}' | jq
|
|
@ -0,0 +1 @@
|
||||||
|
echo { \"date\" : { \"date\" : $(date +%s)}}
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
df -h | tail -n +2 | awk 'BEGIN {printf "{\"diskspace\":[" }{ if(a) printf","; print "{\"mount\":\"" $6 "\",\"size\":\"" $2 "\",\"used\":\"" $3 "\",\"avail\":\"" $4 "\",\"use\":\"" $5 "\"}"; a++; }END {print"]}";}'
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
dpkg -l | tail -n +6 | awk 'BEGIN {printf "{\"dpkg\":[" }{ if(a) printf","; print "{\"status\":\"" $1 "\",\"name\":\"" $2 "\",\"version\":\"" $3"\"}"; a++; }END {print"]}";}'
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
cat /proc/loadavg | awk '{printf"{\"loadavg\":{\"1\":"$1",\"5\":\"$2\",\"15\":"$3",\"process\":"$5"}}"}'
|
|
@ -0,0 +1 @@
|
||||||
|
echo { \"systemd-detect-virt\" : { \"systemd-detect-virt\" : $(systemd-detect-virt)}}
|
|
@ -1,5 +1,5 @@
|
||||||
Package: amp-base
|
Package: amp-base
|
||||||
Version: 1.18
|
Version: 1.21
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
Acquire::http {
|
||||||
|
Proxy "http://apt-cacher.net.lgy.fr:3142";
|
||||||
|
};
|
|
@ -1,5 +1,5 @@
|
||||||
Package: amp-prefered-config
|
Package: amp-prefered-config
|
||||||
Version: 1.04
|
Version: 1.06
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: amp-proxmox-utils
|
Package: amp-proxmox-utils
|
||||||
Version: 1.14
|
Version: 1.22
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
for tmp in $(pct list | grep run | cut -c 1-3)
|
for tmp in $(pct list | grep run | cut -c 1-3)
|
||||||
do
|
do
|
||||||
|
<<<<<<< HEAD
|
||||||
echo ------------------------------------------------------
|
echo ------------------------------------------------------
|
||||||
echo $tmp
|
echo $tmp
|
||||||
echo ------------------------------------------------------
|
echo ------------------------------------------------------
|
||||||
|
@ -9,4 +10,13 @@ do
|
||||||
|
|
||||||
pct exec $tmp amp-full-upgrade
|
pct exec $tmp amp-full-upgrade
|
||||||
pct exec $tmp apt clean
|
pct exec $tmp apt clean
|
||||||
|
=======
|
||||||
|
echo ------------------------------------------------------
|
||||||
|
echo $tmp
|
||||||
|
echo ------------------------------------------------------
|
||||||
|
pct exec $tmp wget -o /tmp/install.sh https://deb.lgy.fr/install.sh
|
||||||
|
pct exec $tmp bash /tmp/install.sh
|
||||||
|
pct exec $tmp amp-full-upgrade
|
||||||
|
pct exec $tmp apt clean
|
||||||
|
>>>>>>> d281ea2 (update)
|
||||||
done
|
done
|
||||||
|
|
|
@ -3,21 +3,27 @@ SRC_DEBOOTSTRAP=/usr/share/debootstrap/scripts
|
||||||
IMAGE=$1
|
IMAGE=$1
|
||||||
URL=$2
|
URL=$2
|
||||||
TARBALL=$1-$(date +%Y%m%d).tar.gz
|
TARBALL=$1-$(date +%Y%m%d).tar.gz
|
||||||
|
|
||||||
if [ -f $SRC_DEBOOTSTRAP/$IMAGE ] ;
|
if [ -f $SRC_DEBOOTSTRAP/$IMAGE ] ;
|
||||||
then
|
then
|
||||||
TARGET=$(tempfile)
|
TARGET=$(mktemp)
|
||||||
rm $TARGET
|
rm $TARGET
|
||||||
mkdir $TARGET
|
mkdir $TARGET
|
||||||
echo create rootfs in temporary folder $TARGET
|
echo create rootfs in temporary folder $TARGET
|
||||||
debootstrap $IMAGE $TARGET $URL > /dev/null
|
debootstrap $IMAGE $TARGET $URL > /dev/null
|
||||||
echo create archive $TARBALL
|
cat <<-EOF > $TARGET/etc/apt/apt.conf.d/99aptlight
|
||||||
tar -C $TARGET -zcvf $TARBALL . > /dev/null
|
APT::Install-Recommends "false";
|
||||||
echo Remove temporary folder
|
APT::Install-Suggests "false";
|
||||||
rm -fr $TARGET
|
EOF
|
||||||
chmod ugo+r $TARBALL
|
chroot $TARGET /usr/bin/apt clean
|
||||||
echo lxc image available in $TARBALL
|
echo create archive $TARBALL
|
||||||
|
tar -C $TARGET -zcvf $TARBALL . > /dev/null
|
||||||
|
echo Remove temporary folder
|
||||||
|
rm -fr $TARGET
|
||||||
|
chmod ugo+r $TARBALL
|
||||||
|
echo lxc image available in $TARBALL
|
||||||
else
|
else
|
||||||
echo $(basename $0) \<version\> [\<url\>]
|
echo $(basename $0) \<version\> [\<url\>]
|
||||||
echo $(basename $0) focal http://archive.ubuntu.com/ubuntu
|
echo $(basename $0) focal http://archive.ubuntu.com/ubuntu
|
||||||
ls $SRC_DEBOOTSTRAP
|
ls $SRC_DEBOOTSTRAP
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: amp-upgrade-airsonic
|
Package: amp-upgrade-airsonic
|
||||||
Version: 1.01
|
Version: 1.03
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: amp-upgrade-baikal
|
Package: amp-upgrade-baikal
|
||||||
Version: 1.01
|
Version: 1.03
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: amp-upgrade-bitwardenrs
|
Package: amp-upgrade-bitwardenrs
|
||||||
Version: 1.02
|
Version: 1.04
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: amp-upgrade-ejabberd
|
Package: amp-upgrade-ejabberd
|
||||||
Version: 1.05
|
Version: 1.07
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: amp-upgrade-element-web
|
Package: amp-upgrade-element-web
|
||||||
Version: 1.02
|
Version: 1.04
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: amp-upgrade-golang
|
Package: amp-upgrade-golang
|
||||||
Version: 1.01
|
Version: 1.03
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: amp-upgrade-gotify
|
Package: amp-upgrade-gotify
|
||||||
Version: 1.02
|
Version: 1.04
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: amp-upgrade-phpmyadmin
|
Package: amp-upgrade-phpmyadmin
|
||||||
Version: 1.02
|
Version: 1.04
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: amp-upgrade-roundcube
|
Package: amp-upgrade-roundcube
|
||||||
Version: 1.01
|
Version: 1.03
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: amp-upgrade-unifi
|
Package: amp-upgrade-unifi
|
||||||
Version: 1.01
|
Version: 1.03
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: amp-webdav
|
Package: amp-webdav
|
||||||
Version: 1.01
|
Version: 1.03
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: logveillance
|
Package: logveillance
|
||||||
Version: 1.17
|
Version: 1.19
|
||||||
Section: base
|
Section: base
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
Loading…
Reference in New Issue