Spaces:
Sleeping
Sleeping
Create setup.sh
Browse files
setup.sh
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Tunggu database siap (jika perlu)
|
| 4 |
+
sleep 10
|
| 5 |
+
|
| 6 |
+
# Copy wp-config.php jika belum ada
|
| 7 |
+
if [ ! -f /var/www/html/wp-config.php ]; then
|
| 8 |
+
cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.php
|
| 9 |
+
|
| 10 |
+
# Set WP_ALLOW_REPAIR
|
| 11 |
+
sed -i "/^\/\* That's all, stop editing! Happy publishing. \*\//i \
|
| 12 |
+
define('WP_ALLOW_REPAIR', true);" /var/www/html/wp-config.php
|
| 13 |
+
fi
|
| 14 |
+
|
| 15 |
+
# Set permissions
|
| 16 |
+
chown -R www-data:www-data /var/www/html
|
| 17 |
+
chmod -R 755 /var/www/html
|
| 18 |
+
|
| 19 |
+
# Start Apache
|
| 20 |
+
exec apache2-foreground
|