mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
fixes path removal
This commit is contained in:
@@ -13,8 +13,8 @@ import Lib.Ssl
|
||||
import Daemon.ZeroConf ( getStart9AgentHostname )
|
||||
import Lib.Tor
|
||||
import Control.Carrier.Lift
|
||||
import System.Directory ( renameDirectory
|
||||
, removeDirectory
|
||||
import System.Directory ( removePathForcibly
|
||||
, renameDirectory
|
||||
)
|
||||
import Lib.SystemCtl
|
||||
import qualified Lib.Notifications as Notifications
|
||||
@@ -66,7 +66,7 @@ renewSslLeafCert ctx = do
|
||||
$ Notifications.emit (AppId "EmbassyOS") agentVersion
|
||||
$ Notifications.CertRenewFailed (ExitFailure n) out err
|
||||
let sslDir = toS $ sslDirectory `relativeTo` base
|
||||
liftIO $ removeDirectory sslDir
|
||||
liftIO $ removePathForcibly sslDir
|
||||
liftIO $ renameDirectory sslDirTmp sslDir
|
||||
liftIO $ systemCtl RestartService "nginx" $> ()
|
||||
|
||||
|
||||
@@ -526,7 +526,7 @@ replaceDerivativeCerts = do
|
||||
ExitFailure n -> throwError $ OpenSslE "leaf" n out' err'
|
||||
|
||||
sslDir <- toS <$> getAbsoluteLocationFor sslDirectory
|
||||
liftIO $ removeDirectory sslDir
|
||||
liftIO $ removePathForcibly sslDir
|
||||
liftIO $ renameDirectory sslDirTmp sslDir
|
||||
liftIO $ systemCtl RestartService "nginx" $> ()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user