forked from lavoiesl/bash-templater
-
Notifications
You must be signed in to change notification settings - Fork 41
resolves johanhaleby/bash-templater#10 #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ceremcem
wants to merge
15
commits into
johanhaleby:master
Choose a base branch
from
ceremcem:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2919f95
Create LICENSE
lavoiesl af43425
Added tips on invoking while reading variables from a file
lavoiesl 21cd0c5
Cleanup escaping
lavoiesl dfe9c5b
shellcheck lint
lavoiesl e6e648b
Add travis-ci
lavoiesl b3871a6
Build status badge
lavoiesl a245cf8
Update README.md
lavoiesl 265e91f
Allow whitespace inside braces (#3)
guillermocalvo b10473a
resolves johanhaleby/bash-templater#10
fbaf786
Merge remote-tracking branch 'original/master' into master
c38728b
resolves johanhaleby/bash-templater#12
1843813
fixed --nounset handling
6e6803e
fixed no-variable-template handling.
659cee8
added "--verbose" switch for a clearer output
da62a99
working directory of config file is now its own dir
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,2 @@ | ||
| language: bash | ||
| script: ./test.sh |
This file contains hidden or 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 hidden or 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,28 +1,22 @@ | ||
| {{LOG_DIR=/var/log/apache2}} | ||
| {{RUN_DIR=/var/run/php-fpm}} | ||
| {{FCGI=$RUN_DIR/$DOMAIN.fcgi}} | ||
| {{SOCKET=$RUN_DIR/$DOMAIN.sock}} | ||
| {{EMAIL=$USER@$DOMAIN}} | ||
| {{DOC_ROOT=/home/$USER/sites/$DOMAIN/htdocs}} | ||
| <VirtualHost *:80> | ||
| ServerAdmin {{EMAIL}} | ||
| ServerName {{DOMAIN}} | ||
| ServerAlias www.{{DOMAIN}} | ||
| ServerAdmin nobody@example.com | ||
| ServerName example.com | ||
| ServerAlias www.example.com | ||
|
|
||
| DocumentRoot "{{DOC_ROOT}}" | ||
| DocumentRoot "/home/nobody/sites/example.com/htdocs" | ||
|
|
||
| <Directory "{{DOC_ROOT}}"> | ||
| <Directory "/home/nobody/sites/example.com/htdocs"> | ||
| AllowOverride All | ||
| Order allow,deny | ||
| Allow From All | ||
| </Directory> | ||
|
|
||
| AddHandler php-script .php | ||
| Action php-script /php5.fastcgi virtual | ||
| Alias /php5.fastcgi {{FCGI}} | ||
| FastCGIExternalServer {{FCGI}} -socket {{SOCKET}} | ||
| Alias /php5.fastcgi /var/run/php-fpm/example.com.fcgi | ||
| FastCGIExternalServer /var/run/php-fpm/example.com.fcgi -socket /var/run/php-fpm/example.com.sock | ||
|
|
||
| LogLevel warn | ||
| CustomLog {{LOG_DIR}}/{{DOMAIN}}.access.log combined | ||
| ErrorLog {{LOG_DIR}}/{{DOMAIN}}.error.log | ||
| CustomLog /var/log/apache2/example.com.access.log combined | ||
| ErrorLog /var/log/apache2/example.com.error.log | ||
| </VirtualHost> | ||
This file contains hidden or 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,28 @@ | ||
| {{LOG_DIR=/var/log/apache2}} | ||
| {{RUN_DIR=/var/run/php-fpm}} | ||
| {{FCGI=$RUN_DIR/$DOMAIN.fcgi}} | ||
| {{SOCKET=$RUN_DIR/$DOMAIN.sock}} | ||
| {{EMAIL=$USER@$DOMAIN}} | ||
| {{DOC_ROOT=/home/$USER/sites/$DOMAIN/htdocs}} | ||
| <VirtualHost *:80> | ||
| ServerAdmin {{EMAIL}} | ||
| ServerName {{DOMAIN}} | ||
| ServerAlias www.{{ DOMAIN }} | ||
|
|
||
| DocumentRoot "{{DOC_ROOT}}" | ||
|
|
||
| <Directory "{{ DOC_ROOT }}"> | ||
| AllowOverride All | ||
| Order allow,deny | ||
| Allow From All | ||
| </Directory> | ||
|
|
||
| AddHandler php-script .php | ||
| Action php-script /php5.fastcgi virtual | ||
| Alias /php5.fastcgi {{FCGI}} | ||
| FastCGIExternalServer {{ FCGI }} -socket {{SOCKET}} | ||
|
|
||
| LogLevel warn | ||
| CustomLog {{LOG_DIR}}/{{DOMAIN}}.access.log combined | ||
| ErrorLog {{LOG_DIR }}/{{ DOMAIN}}.error.log | ||
| </VirtualHost> |
This file contains hidden or 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 hidden or 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,8 @@ | ||
| #!/bin/bash | ||
|
|
||
| if diff -u <(USER=nobody DOMAIN=example.com ./templater.sh examples/vhost-php.tpl.conf) examples/vhost-php.conf; then | ||
| echo OK | ||
| else | ||
| echo Differences found | ||
| exit 1 | ||
| fi |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.