#! /bin/sh
SERVICE="/etc/systemd/system/wpserver.service"
touch $SERVICE
echo '[Unit]' >> $SERVICE
echo 'Description=wpserver' >> $SERVICE
echo '[Service]' >> $SERVICE
echo 'Type=simple' >> $SERVICE
echo 'WorkingDirectory=/opt/WizePanel/WPServer' >> $SERVICE
echo 'ExecStart=/bin/bash /opt/WizePanel/WPServer/start_headless.sh' >> $SERVICE
echo '[Install]' >> $SERVICE
echo 'WantedBy=multi-user.target' >> $SERVICE
sleep 1
systemctl enable wpserver.service
systemctl start wpserver.service
