-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsite-mode.sh
More file actions
executable file
Β·48 lines (42 loc) Β· 1.55 KB
/
site-mode.sh
File metadata and controls
executable file
Β·48 lines (42 loc) Β· 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# Website Mode Switcher for Volovyk
# Usage: ./site-mode.sh [construction|live]
MODE=${1:-"help"}
case $MODE in
"construction")
echo "π§ Switching to UNDER CONSTRUCTION mode..."
if [ -f "index.html" ]; then
cp index.html index.html.live
echo "β
Current site backed up as index.html.live"
fi
# Replace index.html with under construction content
cp under-construction.html index.html
echo "β
Under construction page is now active"
echo "π Your site will show the maintenance page"
;;
"live")
echo "π Switching to LIVE mode..."
if [ -f "index.html.live" ]; then
cp index.html.live index.html
echo "β
Live site restored from backup"
echo "π Your original site is now active"
else
echo "β No backup found (index.html.live)"
echo "Please restore your original index.html manually"
fi
;;
"help"|*)
echo "Website Mode Switcher"
echo "Usage: ./site-mode.sh [MODE]"
echo ""
echo "Modes:"
echo " construction - Switch to under construction page"
echo " live - Switch back to live site"
echo " help - Show this help"
echo ""
echo "Files:"
echo " index.md.backup - Original site backup"
echo " index.html.live - Live site backup (when in construction mode)"
echo " index.html - Current active homepage"
;;
esac