Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew
Commits
7bdd2a4b
Commit
7bdd2a4b
authored
Aug 06, 2017
by
Ed Reel
Committed by
Kazushi (Jam) Marukawa
Aug 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace aliases with bash scripts instead
parent
f965ecdf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
packages/nginx.rb
packages/nginx.rb
+16
-10
No files found.
packages/nginx.rb
View file @
7bdd2a4b
...
...
@@ -16,22 +16,28 @@ class Nginx < Package
def
self
.
install
system
"make"
,
"DESTDIR=
#{
CREW_DEST_DIR
}
"
,
"install"
system
"sudo ln -sf /usr/local/nginx/sbin/nginx /usr/local/bin/nginx"
system
"sed -i
\'
/^alias startnginx/d
\'
~/.bashrc"
system
"sed -i
\'
/^alias stopnginx/d
\'
~/.bashrc"
system
"sed -i '$ a alias startnginx=
\"
sudo nginx
\"
' ~/.bashrc"
system
"sed -i '$ a alias stopnginx=
\"
sudo nginx -s quit
\"
' ~/.bashrc"
system
"mkdir -p
#{
CREW_DEST_DIR
}#{
CREW_PREFIX
}
/bin"
FileUtils
.
cd
(
"
#{
CREW_DEST_DIR
}#{
CREW_PREFIX
}
/bin"
)
do
system
"sudo ln -sf
#{
CREW_PREFIX
}
/nginx/sbin/nginx nginx"
end
system
"echo '#!/bin/bash' > startnginx"
system
"echo 'sudo nginx' >> startnginx"
system
"echo '#!/bin/bash' > stopnginx"
system
"echo 'sudo nginx -s quit' >> stopnginx"
system
"chmod +x st*nginx"
system
"cp st*nginx
#{
CREW_DEST_DIR
}#{
CREW_PREFIX
}
/bin"
puts
puts
"All
NGINX things are in /usr/local
/nginx."
.
lightblue
puts
"All
things NGINX are in
#{
CREW_PREFIX
}
/nginx."
.
lightblue
puts
puts
"Pages are stored in
/usr/local
/nginx/html."
.
lightblue
puts
"Pages are stored in
#{
CREW_PREFIX
}
/nginx/html."
.
lightblue
puts
puts
"Added bash
aliase
s so you can easily start/stop nginx:"
.
lightblue
puts
"Added bash
script
s so you can easily start/stop nginx:"
.
lightblue
puts
"startnginx - starts nginx"
.
lightblue
puts
"stopnginx - stops nginx"
.
lightblue
puts
puts
"To finish the installation, execute the following:"
.
lightblue
puts
"source ~/.bashrc"
.
lightblue
puts
"To completely remove nginx, perform the following:"
.
lightblue
puts
"crew remove nginx"
.
lightblue
puts
"sudo rm -rf /usr/local/nginx"
.
lightblue
puts
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment