initial commit
This commit is contained in:
commit
d206c242ca
5 changed files with 282 additions and 0 deletions
16
chch-calendar.sh
Executable file
16
chch-calendar.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#! /bin/bash
|
||||
|
||||
CHCH_ICAL_SRC="https://cloud.chch.it/remote.php/dav/public-calendars/KVJE5OXYIY9B9V5C?export"
|
||||
CHCH_ICAL="/var/www/chch_api/chch.ical"
|
||||
RAND="$(date +%s)$RANDOM$RANDOM$RANDOM"
|
||||
|
||||
rm -rf /tmp/chch_*.ical
|
||||
wget "$CHCH_ICAL_SRC" -O /tmp/chch_$RAND.ical -q -T 45
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: wget failed to download calendar" >&2
|
||||
else
|
||||
mv /tmp/chch_$RAND.ical $CHCH_ICAL
|
||||
fi
|
||||
|
||||
head $CHCH_ICAL -n1 >/dev/null 2>&1 && php /etc/chch/chch_ical2mediawiki.php $CHCH_ICAL 2>/dev/null | php /var/www/chch/maintenance/edit.php -m -b --no-rc -s "automatische Aktualisierung aus dem ical feed" "Aktuelle_ChCh-Termine" >/dev/null 2>&1
|
||||
echo "Hauptseite" | php /var/www/chch/maintenance/purgeList.php --purge > /dev/null 2>&1
|
Loading…
Add table
Add a link
Reference in a new issue