This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --L https://ghost.org/zip/ghost-latest.zip -o ghost.zip | |
unzip -uo ghost.zip -d /data/web/ghost | |
cd /data/web/ghost && npm install --production && npm start --production | |
useradd -r -s /bin/false ghost | |
cat << STR >> /etc/systemd/system/ghost.service | |
[Unit] | |
Description=Ghost blog | |
After=network.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $# -lt 1 ]]; then | |
echo "usage: $0 domain" | |
exit 0 | |
else | |
domain=$1 | |
echo "domain is ${domain}" | |
fi |