-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1)Adding: add script template for nginx configure to be restored and …
…restarted
- Loading branch information
1 parent
7af6529
commit 7c72afa
Showing
5 changed files
with
28 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
NODE_ADD=0 | ||
NODE_CHANGE=1 | ||
NODE_DEL=2 | ||
|
||
if [ "$qconf_event" != "$NODE_DEL" ]; then | ||
value=`./qconf get_conf $qconf_path` | ||
|
||
# TODO: Nginx directory, You may change this to your own directory | ||
nginx=/usr/local/nginx | ||
nginx_conf_path=$nginx/conf/nginx.conf | ||
|
||
old_conf_value=`cat $nginx_conf_path` | ||
|
||
#if value is modified, then change the file | ||
if [ "$value" != "$old_conf_value" ]; then | ||
cp $nginx_conf_path ${nginx_conf_path}.bak | ||
echo $value > ${nginx_conf_path}.tmp | ||
mv ${nginx_conf_path}.tmp $nginx_conf_path | ||
|
||
# TODO: Restart nginx, You may change this to your own command of nginx starting | ||
service nginx restart | ||
fi | ||
fi |
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 +1 @@ | ||
qconf-agent: 1.0.0 | ||
qconf-agent: 1.0.2 |