-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
116 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ public function validate() | |
'required', | ||
new FileExists | ||
], | ||
'branch' => 'required', | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/sh | ||
|
||
# Do argument checks | ||
if [ ! "$#" -ge 1 ]; then | ||
echo "Usage: $0 {size}" | ||
echo "Example: $0 4G" | ||
echo "(Default path: /swapfile)" | ||
echo "Optional path: Usage: $0 {size} {path}" | ||
exit 1 | ||
fi | ||
|
||
|
||
## Intro | ||
echo "Welcome to Swap setup script! This script will automatically setup a swap file and enable it." | ||
echo "Root access is required, please run as root or enter sudo password." | ||
echo "Source is @ https://github.com/Cretezy/Swap" | ||
echo | ||
|
||
## Setup variables | ||
|
||
# Get size from first argument | ||
SWAP_SIZE=$1 | ||
|
||
# Get path from second argument (default to /swapfile) | ||
SWAP_PATH="/swapfile" | ||
if [ ! -z "$2" ]; then | ||
SWAP_PATH=$2 | ||
fi | ||
|
||
|
||
## Run | ||
sudo fallocate -l $SWAP_SIZE $SWAP_PATH # Allocate size | ||
sudo chmod 600 $SWAP_PATH # Set proper permission | ||
sudo mkswap $SWAP_PATH # Setup swap | ||
sudo swapon $SWAP_PATH # Enable swap | ||
echo "$SWAP_PATH none swap sw 0 0" | sudo tee /etc/fstab -a # Add to fstab | ||
|
||
sudo sysctl vm.swappiness=10 | ||
sudo sysctl vm.vfs_cache_pressure=50 | ||
|
||
echo "vm.swappiness = 10" >> /etc/sysctl.conf | ||
echo "vm.vfs_cache_pressure = 50" >> /etc/sysctl.conf | ||
|
||
## Outro | ||
|
||
echo | ||
echo "Done! You now have a $SWAP_SIZE swap file at $SWAP_PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
#!/bin/bash | ||
|
||
git pull | ||
composer install --no-interaction --prefer-dist | ||
# composer install --no-interaction --prefer-dist | ||
|
||
# php artisan cache:clear | ||
# php artisan config:clear | ||
# php artisan route:clear | ||
# php artisan config:clear | ||
# php artisan route:clear | ||
# php artisan view:clear | ||
# supervisorctl restart name | ||
# supervisorctl restart name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters