websoft9/appmanage/config/cmd.sh

10 lines
343 B
Bash
Raw Normal View History

2023-04-04 09:28:53 +08:00
#!/bin/bash
# start by supervisord
2023-08-02 16:00:41 +08:00
internal_ip=$(ip addr show eth0 | awk '/inet /{split($2, a, "/"); print a[1]}')
2023-08-02 17:28:43 +08:00
nsenter -m -u -i -n -p -t 1 sh -c "sed -i '/websoft9-appmanage/d' /etc/hosts"
nsenter -m -u -i -n -p -t 1 sh -c "echo $internal_ip websoft9-appmanage>> /etc/hosts"
2023-04-04 09:28:53 +08:00
/usr/bin/supervisord
supervisorctl start all
tail -f /dev/null