labolyon.fr/status/set-status.sh

19 lines
399 B
Bash
Executable File

#!/bin/bash
if [ "$#" = "0" ]; then
echo "Usage set-status.sh [new-status]"
echo ""
echo "[new-status] can be \"opened\" or \"closed\""
echo ""
exit 1
fi
if [ "$1" = "opened" ]; then
ln -sf "index.ouvert.html" "/var/www/html/index.html"
fi
if [ "$1" = "closed" ]; then
ln -sf "index.fermé.html" "/var/www/html/index.html"
fi
chown -r www-data:www-data /var/www/html/