New SSH authorize file; whatismyip fix; PKGBUILDs

This commit is contained in:
DarkFeather
2018-02-13 13:22:57 -06:00
parent d2deb6bee3
commit 861587a99e
8 changed files with 104 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
LIST=arch-update close-guest fix-sound log-guest open-guest restart-service silent-guardian revproxy simple-web wifi wifiboot
LOCATION=/root/bin
INSTALLER != curl -s https://aninix.net/foundation/installer-test.bash | /bin/bash
LOCATION=${pkgbuild}/root/bin
INSTALLER != curl -s https://aninix.net/foundation/installer-test.bash | bash
PERMISSION=0700
compile: ${LIST} ./wifi.service
@@ -8,22 +8,22 @@ compile: ${LIST} ./wifi.service
install: compile
mkdir -p ${LOCATION};
mkdir -p /var/log/aninix/
mkdir -p ${pkgbuild}/var/log/aninix/
for i in ${LIST}; do cp ./$$i ${LOCATION}; done
cp ./wifi.service /usr/lib/systemd/system/wifi.service
cp ./wifi.service ${pkgbuild}/usr/lib/systemd/system/wifi.service
make checkperm
reverse:
for i in ${LIST}; do cp ${LOCATION}/$$i .; done
cp /usr/lib/systemd/system/wifi.service .
cp ${pkgbuild}/usr/lib/systemd/system/wifi.service .
test: ${LIST}
for i in ${LIST}; do [ "$$(grep -c '#/bin/bash' $$i)" -ne 1 ]; done
for i in ${LIST}; do [ "$$(grep -c '#!/bin/bash' $$i)" -ne 1 ]; done
checkperm:
for i in ${LIST}; do chown root:root ${LOCATION}/$$i; chmod ${PERMISSION} ${LOCATION}/$$i; done
chown root: /usr/lib/systemd/system/wifi.service;
chmod 0644 /usr/lib/systemd/system/wifi.service
chown root: ${pkgbuild}/usr/lib/systemd/system/wifi.service;
chmod 0644 ${pkgbuild}/usr/lib/systemd/system/wifi.service
clean:
@echo Nothing to do.

View File

@@ -20,7 +20,7 @@ echo == Updating Arch Packages == | tee -a $logfile
if [ ! -z "$apply" ]; then
pacman -Syu 2>&1 | tee -a $logfile # I've been having troubles with this causing crashes while online.
# Hook for MediaWiki
if [ `grep $(date +$F) /var/log/pacman.log | grep -c mediawiki` -eq 1 ] && [ -d /usr/share/webapps/mediawiki ]; then
if [ `grep $(date +%F) /var/log/pacman.log | grep -c mediawiki` -eq 1 ] && [ -d /usr/share/webapps/mediawiki ]; then
php /usr/share/webapps/mediawiki/maintenance/update.php | tee -a $logfile
for i in `find /usr/share/webapps/ -maxdepth 1 -type d | grep mediawiki\-`; do
rsync -avz --exclude images --exclude Images --exclude LocalSettings.php /usr/share/webapps/mediawiki/ "$i"
@@ -28,7 +28,7 @@ if [ ! -z "$apply" ]; then
done
fi
# Hook for Grimoire
if [ `grep $(date +$F) /var/log/pacman.log | grep -c 'upgraded postgresql '` -eq 1 ]; then
if [ `grep $(date +%F) /var/log/pacman.log | grep -c 'upgraded postgresql '` -eq 1 ]; then
echo "Updating PostGreSQL databases" | tee -a $logfile
#Clear old backups.
rm -Rf /var/lib/postgres/olddata