Follow

preparing to

digital.globalclimatestrike.ne uses third party js, so you can presumably access "striking" sites just fine by disabling javascript.

Currently researching how to do it at the web server level.

This seems to do the trick for on . To enable the strike just put what you want into the `503.html`, when you're done striking just move the `503.html` out of the way again.

```
location / {
if (-f $document_root/503.html) {
return 503;
}
# continue as usual
try_files $uri $uri/ =404;
}
error_page 503 /503.html;
location /503.html {
try_files /503.html =503;
}
```

Note: this blocks out the whole domain, needs more tuning if you want to have parts of it work (eg for images on the 503 page).

I think I have something automated now:

`crontab -l`:
```
0 0 * * fri /path/to/climate-strike.sh on
0 0 * * sat /path/to/climate-strike.sh off
```

`climate-strike.sh`
```#!/bin/sh
targets="all my websites"
if [ "x$1" = "xon" ]
then
for target in ${targets}
do
cp -f "/path/to/503.html" "/var/www/${target}/503.html"
done
elif [ "x$1" = "xoff" ]
then
for target in ${targets}
do
rm -f "/var/www/${target}/503.html"
done
else
echo "usage: $0 on/off"
fi
```

Sign in to participate in the conversation
post.lurk.org

Welcome to post.lurk.org, an instance for discussions around cultural freedom, experimental, new media art, net and computational culture, and things like that. This is part of a family of services that include mailing lists, group chat, and XMPP.