1. make service file

sudo vim /etc/systemd/system/superset.service

fill this file with,

#superset.service

###########

[Unit]

Description=Visualization platform by Chrono

After=multi-user.target


[Service]

Type=simple

User=YOUR_USERNAME

ExecStart=/etc/init.d/superset


[Install]

WantedBy=default.target


2. make script

sudo vim /etc/init.d/superset 

fill this file with,

#!/bin/bash

source /your/virtualenv/path/bin/activate

/your/virtualenv/path/bin/superset runserver

make script to executable

sudo chmod +x /etc/init.d/superset 


3. update systemctl

sudo systemctl daemon-reload


4. start/stop/restart/status

sudo systemctl start superset

sudo systemctl stop superset

sudo systemctl restart superset

sudo systemctl status superset


블로그 이미지

시간을 거스르는자

ytkang86@gmail.com

,