Commit 0a0ed137bd599e720a58a4ef7a4601cc85b5caf7
1 parent
1f58c1b0
When following instructions on https://thingsboard.io/docs/user-guide/contributi…
…on/how-to-contribute/#create-database-schema-and-populate-demo-data, the install script doesn't work when the thingsboard user doens't have a password because su is used instead of sudo.
Showing
1 changed file
with
2 additions
and
2 deletions
... | ... | @@ -30,13 +30,13 @@ export SQL_DATA_FOLDER=${SQL_DATA_FOLDER:-/tmp} |
30 | 30 | |
31 | 31 | run_user=thingsboard |
32 | 32 | |
33 | -su -s /bin/sh -c "java -cp ${jarfile} $JAVA_OPTS -Dloader.main=org.thingsboard.server.ThingsboardInstallApplication \ | |
33 | +sudo -u "$run_user" -s /bin/sh -c "java -cp ${jarfile} $JAVA_OPTS -Dloader.main=org.thingsboard.server.ThingsboardInstallApplication \ | |
34 | 34 | -Dinstall.data_dir=${installDir} \ |
35 | 35 | -Dinstall.load_demo=${loadDemo} \ |
36 | 36 | -Dspring.jpa.hibernate.ddl-auto=none \ |
37 | 37 | -Dinstall.upgrade=false \ |
38 | 38 | -Dlogging.config=logback.xml \ |
39 | - org.springframework.boot.loader.PropertiesLauncher" "$run_user" | |
39 | + org.springframework.boot.loader.PropertiesLauncher" | |
40 | 40 | |
41 | 41 | if [ $? -ne 0 ]; then |
42 | 42 | echo "ThingsBoard DB installation failed!" | ... | ... |