a
    Aþd<  ã                   @   sN   d dl Z d dlmZ d dlmZ edœdd„Zddœdd„Zddœd	d
„ZdS )é    N)ÚPath)Úscript_path)Úreturnc                   C   s   t tj d¡ƒS )zg
    Return True if the webui is restartable (i.e. there is something watching to restart it with)
    ZSD_WEBUI_RESTART)ÚboolÚosÚenvironÚget© r	   r	   ú7/var/www/html/stable-diffusion-webui/modules/restart.pyÚis_restartable   s    r   c                   C   s   t tƒd d  ¡  tƒ  dS )z€creates file tmp/restart and immediately stops the process, which webui.bat/webui.sh interpret as a command to start webui againÚtmpÚrestartN)r   r   ÚtouchÚstop_programr	   r	   r	   r
   Úrestart_program   s    r   c                   C   s   t  d¡ d S )Nr   )r   Ú_exitr	   r	   r	   r
   r      s    r   )	r   Úpathlibr   Úmodules.paths_internalr   r   r   r   r   r	   r	   r	   r
   Ú<module>   s
   