@@ -112,39 +112,41 @@ When converting a project to pm2 you should create an `ecosystem.json` file with
112112
113113Now once you've almost finished deploying with pm2 you will need to stop it with the service scripts:
114114
115- ` service stop {appname} `
115+ ` sudo service stop {appname}`
116116
117117If you have a {appname}-watch script then stop that as well:
118118
119- ` service stop {appname}-watch `
119+ ` sudo service stop {appname}-watch`
120120
121121You should now be able to run ` pm2 startOrRestart ecosystem.json `
122122
123123Now that the project is deployed and assuming it's running okay you will need to clean up the old deployment.
124124
125125Firstly, remove the chkconfig
126126
127- ` chkconfig -del {appname} `
127+ ` sudo chkconfig - -del {appname}`
128128
129129And also for the watch script if appropriate
130130
131- ` chkconfig -del {appname}-watch `
131+ ` sudo chkconfig - -del {appname}-watch`
132132
133133Then delete the scripts
134134
135- ` rm /etc/init.d/{appname} `
135+ ` sudo rm /etc/init.d/{appname}`
136136
137- ` rm /etc/{appname} `
137+ ` sudo rm /etc/{appname}`
138138
139139And for the watch script:
140140
141- ` rm /etc/init.d/{appname}-watch `
141+ ` sudo rm /etc/init.d/{appname}-watch `
142+
143+ ` sudo rm /etc/{appname}-watch `
142144
143145Older projects were typically deployed using a .git .live folder structure, since we no longer need these you can delete them:
144146
145147` rm -r /space/projects/{appname}.git `
146148
147- ` rm -r /space/projects/{appname}.live] `
149+ ` rm -r /space/projects/{appname}.live `
148150
149151Finally delete the git remote that pointed to the .git folder from your laptop:
150152
0 commit comments