docs: Fix missing quotes in su zulip -c documentation.

This fixes an actual user-facing issue in our mobile push
notifications documentation (where we were incorrectly failing to
quote the argument to `./manage.py register_server` making it not
work), as well as preventing future similar issues from occurring
again via a linter rule.
This commit is contained in:
Tim Abbott
2018-11-30 12:08:25 -08:00
parent 9ec154bbe8
commit e414036eb3
5 changed files with 10 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ follows:
registration command:
```
# As root:
su zulip -c /home/zulip/deployments/current/manage.py register_server
su zulip -c '/home/zulip/deployments/current/manage.py register_server'
# Or as the zulip user, you can skip the `su zulip -c`:
/home/zulip/deployments/current/manage.py register_server
```

View File

@@ -16,7 +16,7 @@ administrator can do. To change any of the following settings, edit
the `/etc/zulip/settings.py` file on your Zulip server, and then
restart the server with the following command:
```
su zulip -c /home/zulip/deployments/current/scripts/restart-server
su zulip -c '/home/zulip/deployments/current/scripts/restart-server'
```
## Specific settings

View File

@@ -77,7 +77,7 @@ messages until the migration finishes.
Once the migrations are complete, restart Zulip:
su zulip -c /home/zulip/deployments/current/scripts/restart-server
su zulip -c '/home/zulip/deployments/current/scripts/restart-server'
Now, you can use full-text search across all languages.
@@ -100,7 +100,7 @@ Then, set `USING_PGROONGA = False` in `/etc/zulip/settings.py`:
And, restart Zulip:
su zulip -c /home/zulip/deployments/current/scripts/restart-server
su zulip -c '/home/zulip/deployments/current/scripts/restart-server'
Now, full-text search feature based on PGroonga is disabled. If you'd
like, you can also remove the `pgroonga = enabled` line in

View File

@@ -315,7 +315,7 @@ if [ "$has_appserver" = 0 ]; then
# If we're installing from a git checkout, we need to run
# `tools/update-prod-static` in order to build the static
# assets.
su zulip -c "/home/zulip/deployments/current/tools/update-prod-static --authors-not-required"
su zulip -c '/home/zulip/deployments/current/tools/update-prod-static --authors-not-required'
fi
fi
@@ -331,7 +331,7 @@ if [ -n "$NO_INIT_DB" ]; then
Stopping because --no-init-db was passed. To complete the installation, run:
su zulip -c /home/zulip/deployments/current/scripts/setup/initialize-database
su zulip -c '/home/zulip/deployments/current/scripts/setup/initialize-database'
EOF
exit 0
fi

View File

@@ -770,6 +770,10 @@ def build_custom_checkers(by_lang):
'include_only': set(['docs/']),
'description': "Use relative links (../foo/bar.html) to other documents in docs/",
},
{'pattern': "su zulip -c [^']",
'include_only': set(['docs/']),
'description': "Always quote arguments using `su zulip -c '` to avoid confusion about how su works.",
},
{'pattern': r'\][(][^#h]',
'include_only': set(['README.md', 'CONTRIBUTING.md']),
'description': "Use absolute links from docs served by GitHub",