2020年7月21日 星期二

rep

I would start by questioning why you think you want to do this.  A well maintained computer system will run for months, stopping only for upgrades or other changes.  I've seen a Confluence with an uptime approaching 18 months (Although I wouldn't recommend that, because the server running it really really should have been upgraded past a point where it needed a restart)
After you've solved the underlying problems, and come up with a good reason for a regular restart, I'd go with a crontab that simply does "systemctl stop confluence" and then the same with a start 5 minutes later during the quietest hour for your people.  (4am on a Sunday is a good option, although as a support person, 9pm on a Friday actually works better - gives us a weekend to fix it if it fails)

2020年7月20日 星期一

code

for i in /var/example/attachments/ver003/112/24 /var/example/attachments/ver003/10/13/12 /var/example/attachments/ver003/119/12; do 
    du $i -sh | awk -v p=$i '{print p,":",$1;}'
done

2020年7月14日 星期二

attachment

https://confluence.atlassian.com/display/CONF42/Hierarchical+File+System+Attachment+Storage

2020年7月13日 星期一

connection

Imports System.Data
Imports System.Data.SqlClient

Partial Class vendor_ListCheck
    Inherits System.Web.UI.Page
    Dim con As New SqlConnection(Udf.WKConnectionString)
    Dim dt As New DataTable
    Sub bindata()
        Dim ad As New SqlDataAdapter("select * from dbo.ListData", con)
        ad.Fill(dt)

        With GridView1
            .DataSource = dt
            .DataBind()
        End With
    End Sub


Imports Microsoft.VisualBasic
Imports System.Data
Imports System.Data.SqlClient


Partial Public Class Udf
    Public Shared Function WKConnectionString() As String
        '資料庫連線字串
        Dim connString As String = ConfigurationManager.ConnectionStrings("WorkOrderConnectionString").ConnectionString
        Return connString
    End Function
    Public Shared Function Get_us(ByVal st1 As String) As String
        Dim DB As String
        DB = ""
        Dim connStr As String
        connStr = "Password=123;Persist Security Info=True;User ID=jea22s;Initial Catalog=222r;Data Source=12222"
        Dim conn As New SqlConnection(connStr)
        conn.Open()
        Dim SQLStr As String
        SQLStr = "SELECT unit.name_ FROM unit INNER JOIN us ON unit.unid = us.unit WHERE (us.uid = '" & st1 & "')"
        Dim cmd As New SqlCommand(SQLStr, conn)
        Dim reader As SqlDataReader = cmd.ExecuteReader()
        If reader.Read() Then
            DB = reader.Item(0)

        End If
        reader.Close()
        conn.Close()
        conn = Nothing

        Return DB
    End Function

2020年7月12日 星期日

cli

https://ektron0116.neocities.org/software/cli-20200712T135133Z-001.zip