more scripts
This commit is contained in:
parent
792a589daa
commit
6c2bfe74cb
4
bin/install.sh
Normal file → Executable file
4
bin/install.sh
Normal file → Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
export PATH
|
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
LANG="en_US.UTF-8"
|
||||||
|
export LANG
|
||||||
|
|
||||||
|
MYPATH="/opt/bgpblist"
|
||||||
|
|
||||||
|
MYUSER=$(whoami)
|
||||||
|
if [ ${MYUSER} != "root" ]; then
|
||||||
|
echo "*** USER IS NOT ROOT ***"
|
||||||
|
echo "*** WILL NOT UPDATE ****"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "*** START ***"
|
||||||
|
cd ${MYPATH} || ( echo "ERROR: could not change to dif"; exit 1 )
|
||||||
|
git pull
|
||||||
|
cp /opt/bgpblist/etc/systemd/bgpblacklist.service /etc/systemd/system/bgpblacklist.service
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl restart bgpblacklist.service
|
||||||
|
echo "*** DONE ***"
|
Loading…
Reference in New Issue
Block a user