Improve format disable ssl for node

This commit is contained in:
Luis Guzmán 2020-08-15 02:13:47 -05:00
parent b322d71dac
commit 3730ca9bff
1 changed files with 12 additions and 16 deletions

View File

@ -76,6 +76,10 @@ install_ifnot jq
install_ifnot nodejs install_ifnot nodejs
install_ifnot postgresql-$PSGVER install_ifnot postgresql-$PSGVER
# Link LE certs on Etherpad directory
#chmod 755 /etc/letsencrypt/live
#ln -s /etc/letsencrypt/live/$DOMAIN $ETHERPAD_HOME/
# Create DB # Create DB
echo -e "> Creating postgresql database for etherpad...\n" echo -e "> Creating postgresql database for etherpad...\n"
sudo -u postgres psql <<DB sudo -u postgres psql <<DB
@ -101,22 +105,16 @@ cp $ETHERPAD_HOME/settings.json $ETHERPAD_HOME/settings.json.backup
cat << SETTINGS_JSON > $ETHERPAD_HOME/settings.json cat << SETTINGS_JSON > $ETHERPAD_HOME/settings.json
{ {
"title": "Conference Etherpad", "title": "Conference Etherpad",
"favicon": "favicon.ico", "favicon": "favicon.ico",
"skinName": "colibris",
"skinName": "colibris"
"ip": "0.0.0.0", "ip": "0.0.0.0",
"port": 9001, "port": 9001,
"showSettingsInAdminPage": true, "showSettingsInAdminPage": true,
// "ssl" : {
"ssl" : { // "key" : "$ETHERPAD_HOME/$DOMAIN/privkey.pem",
"key" : "/etc/letsencrypt/live/$DOMAIN/privkey.pem", // "cert" : "$ETHERPAD_HOME/$DOMAIN/fullchain.pem",
"cert" : "/etc/letsencrypt/live/$DOMAIN/fullchain.pem", // "ca" : "$ETHERPAD_HOME/$DOMAIN/chain.pem"
}, // },
"dbType" : "postgres", "dbType" : "postgres",
"dbSettings" : { "dbSettings" : {
"user" : "$ETHERPAD_DB_USER", "user" : "$ETHERPAD_DB_USER",
@ -124,10 +122,8 @@ cat << SETTINGS_JSON > $ETHERPAD_HOME/settings.json
"password": "$ETHERPAD_DB_PASS", "password": "$ETHERPAD_DB_PASS",
"database": "$ETHERPAD_DB_NAME", "database": "$ETHERPAD_DB_NAME",
"charset" : "utf8mb4" "charset" : "utf8mb4"
} },
"defaultPadText" : "Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nGet involved with Etherpad at https:\/\/etherpad.org\n", "defaultPadText" : "Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nGet involved with Etherpad at https:\/\/etherpad.org\n",
"users": { "users": {
"admin": { "admin": {
// 1) "password" can be replaced with "hash" if you install ep_hash_auth // 1) "password" can be replaced with "hash" if you install ep_hash_auth
@ -147,7 +143,7 @@ After=syslog.target network.target
[Service] [Service]
Type=simple Type=simple
User=$ETHERPAD_USER User=$ETHERPAD_USER
Group=$ETHERPAD_USER Group=Group=$ETHERPAD_USER
WorkingDirectory=$ETHERPAD_HOME WorkingDirectory=$ETHERPAD_HOME
Environment=NODE_ENV=production Environment=NODE_ENV=production
ExecStart=$ETHERPAD_HOME/bin/run.sh ExecStart=$ETHERPAD_HOME/bin/run.sh